# squares ending with repeated digits

I am working on square ending in repeated digits in different bases. I have encountered the following problems during my work. can you generalize the following??? If the digit $a < p$ is a quadratic residue $\pmod p$, then the base $p$ number $A_n$ consisting of $n$ $a$’s is a quadratic residue $\pmod {p^n}$ and as a corollary, squares exist in base $p$ ending in $n$ $a$’s.

Also, generalize "A serd ending 4444 is not possible in any base of the form 𝟒𝒕+𝟐"

-
If you mean what I suspect you mean, the correct spelling is "surd". – Michael Hardy Aug 21 '11 at 17:09
First of all, thank you for editing. – Gandhi Aug 21 '11 at 17:17
I have given in the last sentance is SERD but not surd. – Gandhi Aug 21 '11 at 17:19
The exact meaning of SERD is: To avoid unnecessary repetition of words we shall define a ‘serd’ as a square ending in repeated, non –zero digits. For example, 144 is an example of a serd. – Gandhi Aug 21 '11 at 17:20
"...we shall define a ‘serd’ ..." - who is "we" supposed to be? – J. M. Aug 21 '11 at 18:06

If $p$ is an odd prime and $x^2 = b p^k + y \equiv y \mod p^k$, then $(c p^k + x)^2 \equiv a p^k + y \mod p^{k+1}$ if $2 c x + b \equiv a \mod p$, which can be solved for $c$. So if $y \ne 0$ is a quadratic residue mod $p$, any string of $k$ base-$p$ digits ending in $y$ corresponds to a quadratic residue mod $p^k$.