| Ngoc
Tran |
find the smallest positive integer m such that m is not a square and yet in the decimal expansion of sqrt(m), the decimal point is followed by at least 4 consecutives zeros. Thanks for your help, |
||||||
| Hugh
Venables |
A idea to start with is that this number must be one larger than a perfect square (which you could call x^2) that is large enough so that adding 1 to it (to get x^2+1 - the number you want) only adds 0.0001 to x (well, just less but there will be rounding as dealing with integers). |
||||||
| Yatir
Halevi |
I checked up to 5 million and didn't find any. Does this number exist? Yatir |
||||||
| Stephen
Burgess |
Consider (x+.0001)2 > x2 +1 for x as an integer. If this were true, then
|
||||||
| Hugh
Venables |
The number does exist and can be worked out using a formula (and it's bigger than 5 million) |
||||||
| Yatir
Halevi |
The number is 25000001 |
||||||
| Ngoc
Tran |
How did you work it out? |
||||||
| Yatir
Halevi |
QBASIC |
||||||
| Steve
Megson |
That's one way. As Stephen says above, for x=Öm we need (x+0.0001)2 > x2 +1 x2+0.0002x+0.00012 > x2 + 1 0.0002 x > 1-0.00012 x > 5000 - (1/20000) m > 24999999.5 So any ''one more than a perfect square'' above 25000000 works, and 25000001 is the least of these. Steve |
||||||
| Yatir
Halevi |
I don't see why the formula works.... |
||||||
| Steve
Megson |
Correction: that should be
. Then we require Öm < x+0.0001 m < (x+0.0001)2 x2+1 < (x+0.0001)2 Steve |
||||||
| Yatir
Halevi |
Thanks. I get it now! |