Let $p$ be an odd prime, and $a_1,a_2,\ldots,a_n$ be a series of integers in arithmetic progression whose common difference is not divisible by $p$. Prove that there exists an index $i$ such that $\displaystyle\prod_{k=1}^p a_k+a_i$ is divisible by $p^2$.

Since $a_1,a_2,\ldots,a_n$ are in arithmetic progression with say common difference $d$, we have the sequence to be $a_1,a_1+d,a_1+2d,\ldots,a_1+(n-1)d$. We then have $$\displaystyle\prod_{k=1}^p a_k+a_i = a_1(a_1+d) \cdots (a_1+(n-1)d)+a_i.$$ How do we continue?


2 Answers 2


Since the common difference is coprime to $p$, we have that the $a_{1}, \dots, a_{p}$ are congruent in some order to $0, 1, \dots, p-1$ modulo $p$. Suppose it is $a_{i} \equiv 0 \pmod{p}$.

Now the product of $a_{1}, \dots, a_{p}$ except $a_{i}$ is congruent to $-1 \pmod{p}$ by Wilson's theorem: $$ \prod_{k \ne i} a_{k} = -1 + p c $$ for some $c$, so that the product of all $a_{1}, \dots, a_{p}$ is congruent to $- a_{i} \pmod{p^{2}}$: $$ \prod_{k} a_{k} = a_{i} \prod_{k \ne i} a_{k} = a_{i} (-1 + p c) \equiv - a_{i} \pmod{p^{2}}, $$ as $p \mid a_{i}$.

Hence $$ \prod_{k=1}^p a_k+a_i \equiv 0 \pmod{p^{2}}. $$

Summing it up: choose the unique $i$ such that $p \mid a_{i}$.

  • $\begingroup$ No way, then. But I thought that your $n$ was the same as $p$, really. $\endgroup$ Jan 10, 2017 at 22:06

Hint : $\{a_{1}, \dots, a_{p}\}$ forms a complete residue system mod $p$ and so $\prod_{k=1}^{p}a_{k}\equiv\prod_{k=1}^{p}k\equiv p!\equiv -p \,(mod\,p^{2})$ by Wilson's theorem.

  • $\begingroup$ How do we choose $a_i$? $\endgroup$
    – Puzzled417
    Jan 10, 2017 at 16:56
  • $\begingroup$ @Puzzled417 Sorry I was little confused. Maybe we have to choose $a_{i}$ which is divisible by $p$. $\endgroup$
    – Seewoo Lee
    Jan 10, 2017 at 17:03

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .