MHB Therefore, the special four-digit number is 9376.

  • Thread starter Thread starter Jameson
  • Start date Start date
AI Thread Summary
The discussion centers on finding a four-digit number \( n \) such that the last four digits of \( n^2 \) equal \( n \). The number 9376 is identified as the only solution through both brute force elimination and a rigorous mathematical approach involving quadratic congruences. The last digits of \( n \) must be 0, 1, 5, or 6, leading to further narrowing down to specific last four digits. The solution is confirmed using the Chinese remainder theorem after solving congruences modulo \( 2^4 \) and \( 5^4 \). Ultimately, 9376 is the only valid four-digit number satisfying the condition.
Jameson
Insights Author
Gold Member
MHB
Messages
4,533
Reaction score
13
There is one four-digit whole number n, such that the last four digits of $n^2$ are in fact the original number n. Find n.
--------------------
 
Physics news on Phys.org
Congratulations to the following members for their correct solutions:

1) Sudharaka

Solution:

This problem can be approached in a brute force way so the interesting part of doing this problem is figuring out ways to eliminate the possibilities. Here is a non-rigorous method:

[sp]Looking at the last digit, the last digit must be either 0, 1, 5 or 6.

Then looking at the last two digits, the last two digits must be either 00, 01, 25 or 76.

Then looking at the last three digits, the last three digits must be either 000, 001, 625 or 376.

Then looking at the last four digits, the last four digits must be either 0000, 0001, 0625 or 9376.

Out of those, only 9376 is a 4 digit number.[/sp]

Here is a much more advanced and rigorous approach from Sudharaka:

[sp]Since the last four digits of \(n^2\) is the number \(n\), if we subtract \(n\) from \(n^2\) we get four zeros in the last four digits. Therefore \(10^4\) divides \(n^2-n\). That is,

\[n^2-n\equiv 0\mbox{ (mod }10^4)\]

This is a quadratic congruence whose solutions can be found out using the the method explained here (http://www.cs.xu.edu/math/math302/04f/PolyCongruences.pdf). Since \(10^4=2^4\times 5^4\) we have to solve the two congruences,

\[n^2-n\equiv 0\mbox{ (mod }2^4)~~~~~~~~(1)\]

and

\[n^2-n\equiv 0\mbox{ (mod }5^4)~~~~~~~~~~~~~~(2)\]

Although the first congruence can be solved by testing for each values from \(0\) to \(15\), solving the second congruence is tedious and we will be forced to use the Hansel's lemma (Hensel's lemma - Wikipedia, the free encyclopedia).

After solving the two congruences (1) and (2) we can use the Chinese remainder theorem (Chinese remainder theorem - Wikipedia, the free encyclopedia) to find out the solution to the original problem,

\[n^2-n\equiv 0\mbox{ (mod }10^4)\]

The answers are,

\[n=0,1,625,9376\mbox{ (mod }10^4)\]

Since we are looking for a four digit number the only possible answer is,

\[n=9376\][/sp]
 
Back
Top