Largest number on multiplying with itself gives the same number as last digits of the product What is the largest number on multiplying with itself gives the same number as last digits of the product?
i.e., $(376 \times 376) = 141376$
i.e., $(25\times 25) = 625$
If the largest number cant be found out can you prove that there is always a number greater than any given number? (only in base $10$)
 A: For any integer $n$,there are $2$ solutions to $x^2 = x \pmod {2^n}$ and $x^2 = x \pmod {5^n}$, which are $0$ and $1$.
Hence by the chinese remainder theorem, there are $4$ solutions to $x^2 = x \pmod {10^n}$. Two of those are the obvious $0$ and $1$, there is one solution which is $0$ mod $5^n$ and $1$ mod $2^n$, and the last one is $0$ mod $2^n$ and $1$ mod $5^n$.
So there is no largest such number.
You can summarize as saying that in the $10$-adic numbers (numbers with an infinite decimal expansion on the left), there are $4$ numbers satisfying $x^2 = x$ : 
$...00000000\\
...00000001\\
...87109376\\
...12890625$
A: Looking for $k$ so that $k^2\equiv k\pmod{10^n}$, we get
$$
k(k-1)\equiv0\pmod{10^n}
$$
Since $\gcd(k,k-1)=1$, we must have one of
$$
\begin{align}
k&\equiv0\pmod{10^n}\tag{1}\\
k&\equiv1\pmod{10^n}\tag{2}\\
k&\equiv0\pmod{2^n}\quad\text{and}\quad k\equiv1\pmod{5^n}\tag{3}\\
k&\equiv1\pmod{2^n}\quad\text{and}\quad k\equiv0\pmod{5^n}\tag{4}
\end{align}
$$
The Chinese Remainder Theorem guarantees a solution for each of these.
$(1)$ and $(2)$ lead to $0$ and $1$, so they are bounded.
$(3)$ and $(4)$ lead to more interesting, unbounded solutions. Note that a solution of $(3)$ or $(4)$ for $n$ is also a solution for $n{-}1$ but with another digit added to the left. Furthermore, it cannot be that there is a bounded solution of $(3)$ or $(4)$; that is, one for all $n$. If $k(k-1)\equiv0\pmod{10^n}$ for all $n$, then $k(k-1)=0$; that is, $k=0$ or $k=1$. Therefore, for any $n$, there is a larger $n'$, so that the digit added to the left for the solution mod $10^{n'}$ is non-zero. Thus, there is no largest such number.
A: The numbers can be arbitrarily large.
Take an arbitrary number $k$, we will produce a number with the desired property that is
at least as big as $5^k$.
$2^k$ and $5^k$ are coprime, so we can find integers $p,q$ such that $p2^k+q5^k=1$, where we
may choose $q$ to be a positive number less than $2^k$.
Now $q5^k$ is our desired number, by our choices it is at least as big as $5^k$ and smaller than $10^k$.
Furthermore $q5^k.q5^k=q5^k(1-p2^k)=q5^k-pq10^k$, so $q5^k.q5^k\equiv q5^k\pmod{10^k}$ as desired.
