Prove that if $ p $ is prime number $(p >3)$, then the number $p^2+2015$ is
multiple of $24 $?
Thank you for any help
Prove that if $ p $ is prime number $(p >3)$, then the number $p^2+2015$ is
multiple of $24 $?
Thank you for any help
All primes $p>3$ are of the form $6n\pm1$. But $$(6n\pm1)^2 +2015=12n(3n\pm1) +2016$$ is divisible by $24$ since one of $n$ and $3n\pm1$ is even, and $2016=84\cdot24$.
Note that $-1 \equiv 2015 \pmod{24}$. So you can consider $p^2 -1$ instead of $p^2 + 2015$. For help with this see for example Show that for any odd $n$ it follows that $n^2 \equiv 1 \mod 8$ and for uneven primes $p\neq 3$ we have $p^2 \equiv 1\mod 24$.
Hint: you can show first that it is a multiple of 8, then that it is a multiple of 3.
Other method: you calculate the equation modulo 24 and for $p$ use all numbers with $\gcd(p,24)=1$ and $0<p<24$
Hint: use the fact that $2016=84\times 24$ to say transform the question to whether $p^2+2016-1=2016+p^2-1$ is divisible by $24$.
Further hints follow, which suggest a slightly different route through which avoids dealing with cases.
Then any prime greater than $3$ is of the form $6n\pm1$ so that $p^2-1=36n^2\pm 12n=24n+12n(n\pm1)$
And we can then note:
Then $n(n\pm1)$ is the product of two successive integers, hence is even.