All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars
 perplexus dot info

 Fit the middle digit (Posted on 2020-11-12)
Determine all possible digits a for which 9...9a0...09 is a square number. (Excluding the digit a there are 101 9's and 100 0's in the number)

 No Solution Yet Submitted by Danish Ahmed Khan Rating: 5.0000 (1 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
 computer solution | Comment 2 of 4 |
digits 220
for a=0:9
n=vpa(9);
for i=1:99
n=n*10+9;
end
n=n*10+a;
for i=1:101
n=n*10;
end
n=n+9;
sr=sqrt(n);
sq=round(sr)*round(sr);
disp(n)
disp(a)
disp(sr)
disp(sq-n)
fprintf('\n')
end

Each group below begins with the trial value of a on a line by itself.  The resulting number itself then is on the next two lines, the line split immediately after the inserted digit. A blank line is placed next followed by the square root of that number. Only in the instance where a perfect square was found does this take up only one line. Finally, if the square root is rounded to an integer and the result squared, is shown the difference between the original number and the square of its rounded square root.

`     09999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000009.099999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999994.9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999216.0     19999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000009.099999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999995.49999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999994375-99999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999984.0     29999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000009.099999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999995.9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999657.0     39999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000009.099999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999996.49999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999998375-99999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999993.0     49999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000009.099999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999997.00.0     59999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000009.099999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999997.5000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000137599999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999995.0     69999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000009.099999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999998.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000025-5.0     79999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000009.099999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999998.5000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000337599999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999992.0     89999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000009.099999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004-8.0     99999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000009.099999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999.5000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000437599999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999991.0`

The only value of a that works is 4.  The square root of its resulting number is

99999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999997.

 Posted by Charlie on 2020-11-12 16:11:33

 Search: Search body:
Forums (0)