Talk:Puzzles/Arithmetical puzzles/Digits of the Square
From Wikibooks, the open-content textbooks collection
9376 - Thomas with a little help of the computer ;). I wonder: is there a trick to do this by hand?
Well, you certainly don't have to try all 9000 possibilities. Hint: 9376 = 9000 + 376. Also (x + y)² = x(x + 2y) + y². Incidentally numbers of this type fall into a rather regular pattern which will require no guess-and-check at all. But you'd probably have to already have some of them to see the pattern. Eric119 04:23, 12 Oct 2003 (UTC)
I don't think you can do this rigourously and algebraically, it involves finding a solution to
for a ∈ [1000,9999] Dysprosia 04:27, 12 Oct 2003 (UTC)
Thinking a bit more about the problem, I am now pretty sure that it can be solved analytically and by hand:
We can start by writing the equation given by Dysposia:

which is equivalent to:

this implies:

or

We can decompose 104 = 24 * 54. Also, it is relatively easy to see that either a must provide all the 2's and a-1 all the 5's or vice versa (because it can't be that both a and a-1 are divisible by 2, or that both a and a-1 are divisible by 5).
Case 1:
If a contained all the 5's then it must be divisible by 625. We now want that:

which is equivalent to:

It turns out that a=625 has
(625 = 39*16+1). Unfortunately a is too small. The other possible multiples of 625 (2*625, 3*625,...,15*625) then give (by laws for modulo operations)
none of which satisfies
. So this case leads to a dead end
Case 2:
If a contained all the 2's then a-1 must be divisible by 625. We now want that:

which is equivalent to:

Now if we run through all the multiples of 625 we find a suitable one (and only this one): a-1=15*625=9375 which means that our desired number is a=9376. Thomas
- Kudos! A nice solution; I would never have seen it :) Dysprosia 08:24, 12 Oct 2003 (UTC)
- Wow. I am impressed. Broadening the scope of discussion, I have been thinking about numbers like these for some months now (though sporadically). In base 10, the sequence is infinite:
- 1
- 5
- 6
- 25
- 76
- 376
- 625
- 9376
- 90625
- 890625
- 109376
- 2890625
- 7109376
- 12890625
- 87109376
- 212890625
- 787109376
- 1787109376
- 8212890625
- and so on
- Note that there are two sequences, one with numbers ending in 5 and the other with numbers ending in 6. The occurence of 1 is a singularity. (I first proved this so I could justify not putting it into my program to find these :-). The 5, 25, 625, 90635... sequence and the 6, 76, 376, 9376... sequence fall into simple patterns that I did not notice until I had proved what they were. The patterns also generalize to bases 4x+2, x in Z and > 0.
- I post all this at the risk of having you prove everything I've asserted within an hour and a lot faster than I did. :) But, hey, it might be worthwhile to compare different proofs. Eric119 20:01, 12 Oct 2003 (UTC)