0

Let $p$ be a prime number. Prove that there exists an integer $a$ such that $p\mid(a^2-a+3)$ if and only if there exists an integer $b$ such that $p\mid(b^2-b+25)$.

I'm getting a bit confused with this problem. I was trying to show first the case $(\Longrightarrow)$ by factoring $a^2-a+3= (a-1)(a-3)+3a$, which would imply that $p\vert(a-1), p\vert(a-3)$ and $p\vert3a$. Looking at the last condition $p\vert3a$ it seems that this would only be true if $p=3$?

Similarly for $(\Longleftarrow)$ the term $b^2-b+25$ factors as $(b-1)(b-25)+25b$ which would imply also that $p\mid(b-1), p\mid t(b-25)$ and $p\mid 25b$.

Is this going anywhere or should I consider something else?

Bernard
  • 179,256
  • 1
    Since it's contest-math, please provide a source so that we know it's not an ongoing contest. – Aphelli Oct 26 '20 at 11:04
  • The problem was on aops. It stated the following "This problem originally appeared on a contest used to determine the Chinese national team.", but I don't have the knowledge on which year it was. It's from the Volume 2 book. –  Oct 26 '20 at 11:06
  • I wish you had written something easier to check, but that's a known problem indeed: https://artofproblemsolving.com/community/c308833_2016_spain_mathematical_olympiad – Aphelli Oct 26 '20 at 11:18
  • 1
    You may find that completing the square is helpful. – PM 2Ring Oct 26 '20 at 11:42

1 Answers1

3

Hint:

Work in the field $\mathbf Z/p\mathbf Z$. $a^2-a+3$ has a root if & only if $\Delta_a=-11\mod p$ is a square, whereas $b^2-b+25$ has a root if & only $\Delta_b=-99\mod p$ is a square.

Bernard
  • 179,256