Determine all possible value(s) of a positive integer x such that the base ten number 14....4 is a perfect square, where the digit 4 is repeated precisely x times.
Considering all x up to 2300, only x=2 and x=3, corresponding to 144 = 12^2 and 1444 = 38^2, work:
list
10 N=14
20 for X=1 to 2300
30 Sr=int(sqrt(N)+0.5)
40 if Sr*Sr=N then print X,Sr
50 N=N*10+4
60 next
OK
run
2 12
3 38
OK
|
Posted by Charlie
on 2009-08-29 19:24:11 |