Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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 𝟒𝒕+𝟐"

share|cite|improve this question
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$.

share|cite|improve this answer
Interesting and amazing solution. – Gandhi Aug 23 '11 at 14:53

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.