# $\gcd(p_{n-1}, \ n^5 - n^3 + n^2 - n + 1) = 1$ where $p_n = n$th prime.

How can I prove in general that, for all $n\geq 2$:

$$\gcd(p_{n-1}, \ n^5 - n^3 + n^2 - n + 1) = 1$$

Seems to always be true:

from sympy import *
from sympy.ntheory.generate import prime

def f(n):
return n**5 - n**3 + n**2 - n +  1

for n in range(3, 100000000):
p = prime(n-1)
d = gcd(f(n), p)
if d != 1:
print (n)


Assume true.

$$f(X) = X^5 - X^3 + X^2 - X + 1$$

is irreducible and modulo each prime, i.e. $f(n+1) \neq 0 \pmod {p_n}$ so that $\prod_{j=2}^n\overline{f(j+1)} \in$ the units of $\Bbb{Z}/2 \times \Bbb{Z}/3 \times \Bbb{Z}/5 \times \dots$

So far it seems like the polynomials $g(X) = f(X \pm 1)$ are such that $g(n) \neq 0 \pmod {p_n}$

• I see this as a coincidence (what's the chance of the polynomial evaluated at n divisible by the n-th prime?). – Kenny Lau Sep 27 '17 at 9:43
• @KennyLau try other polynomials with the code. They don't show the same result. – BananaCats Category Theory App Sep 27 '17 at 9:45
• For example? – Kenny Lau Sep 27 '17 at 9:56
• Why calculate the gcd? $p_{n-1}$ is a prime, it's a divisor of $f(n)$ or not. – Professor Vector Sep 27 '17 at 10:05
• i did not solve it in the comment nor mentioned any thing useful to a proof, in general most of the questions in NT that include both $p_n,n$ are hard to solve and the majority of these question are open problems ,because $p_n$ behave an a very irregular way relevant to $n$. – Ahmad Sep 27 '17 at 10:41