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

Home > Numbers
The Last Three Digits (Posted on 2007-08-28) Difficulty: 3 of 5
A number and its square both have the same last three digits. What are the possibilities for those digits?

See The Solution Submitted by Brian Smith    
Rating: 4.0000 (3 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution proof of solution | Comment 4 of 9 |
Having the same last three digits is generally equivalent to saying that the number and its square are equal mod 1000. (It also might imply that the number itself has three digits but that's a detail.)

if x^2 = x mod 1000 then x(x-1) = 1000k for some k. Now, both x and x-1 can't be even, so only one of these can contribute the factor of 2^3 needed to be a multiple of 1000. A similar argument applies for the factor of 5^3 (1000=2^3*5^3). The solutions, therefore, come from deciding which factor, (x) or (x-1) has contributes 2^3 and which contributes 5^3. There are at most four distinct solutions (mod 1000) then, since there are four combinations.

(1) both come from (x). Then x=1000 mod 1000 and "000" are the common final three digits. (x=0 is a solution according to whether you admit solutions of fewer than three digits or not)

(2) both come from (x-1). Then x-1=1000 mod 1000 and x=1001 mod 1000 and "001" are the common final three digits. (x=1 is a solution if you thought x=0 was a solution)

(3) 2^3 comes from (x) and 5^3 comes from (x-1). Then x = 8k and 8k-1=125m for some k and m. Using the chinese remainder theorem and some inspection yields k=47,m=3 as the solution and x=8*47+1=376 mod 1000 is a solution

(4) 2^3 comes from (x-1) and 5^3 comes from (x). Similar logic to (3) gives x=625 mod 1000 as the solution here.

So the solution is: x=1000, 1001, 376, 625 mod 1000, possibly excepting x=0 and x=1 as having too few digits.

This solution only covers the case of positive numbers, however. There are also solutions involving negative values of x. x= 1000 applies in either case. For x<0 a similar argument to the above yields x=-1, -376, and -625 mod 1000.

The complete solution then is:
x = 1000y (y != 0 if three digit minimum required)
x = 1 + 1000y (y >= 0 or y > 0 if three digit minimum)
x = 376 +1000y (y>=0)
x = 625 + 1000y (y >=0)
x = -1 -1000y (y >= 0 or y > 0 if three digit minimum)
x = -376 -1000y (y>=0)
x= -625 -1000y (y>=0)

If rational solutions are permitted where the "last three digits" are the three rightmost digits and not necessarily the same position relative to the decimal point, then any of the above solutions is still a solution if divided by any positive power of 10. However, no other solutions would be added by this method, since we could always multiply such a solution by a sufficiently large power of 10 to extract an integer solution, which would necessarily be one of the previously listed one. And of course, no irrational solutions exist since there are no "last three digits" for such numbers.



  Posted by Paul on 2007-08-28 19:41:59
Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (0)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (8)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2024 by Animus Pactum Consulting. All rights reserved. Privacy Information