Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

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 have difficulty computing the $\rm mod$ for $a ={1,2,3\ldots50}$. Is there a quick way of doing this?

share|cite|improve this question
The numbers are not large by any standards. I can't see this taking anymore than a two or three minutes even by hand with a calculator. Tedious maybe, but certainly not difficult. What exact difficulties are you having? – EuYu Nov 23 '12 at 15:09

Given $x = 50a^2$, you want to find $r$ such that $50x = 30000q + r$. Then $r$ must be divisible by 50, right? Explain to yourself why that must be the case.

So try to find $a^2 \mod 600$ first. Then express $50a^2 \mod 300000$ in terms of $a^2 \mod 600$. That will help you for all $a$.

Next, notice that if $a^2 < 600$, then $a^2 \mod 600$ is just $a^2$. Use that to save work. For which $a$ do you actually have to compute something?

As the comment by @EuYu says, do the rest by hand.

share|cite|improve this answer

Hint: note that $50(a+1)^2=50a^2+100a+50$

Example: $50\cdot34^2\equiv27800\pmod{30000}$ so $$ \begin{align} 50\cdot35^2 &\equiv27800+34\cdot100+50\\ &\equiv27800+3450\\ &\equiv31250\\ &\equiv1250\pmod{30000} \end{align} $$

share|cite|improve this answer

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.