For which primes $p$ is $p^2+p+1$ prime as well?

1k Views Asked by At

I am looking to find out for which prime numbers $p$, the number $p^2+p+1$ is also prime. The first few are $$2,3,5,17,41,59,71,89,101$$ I tried to take the relation modulo $p+1$ and it turns out that in $\mathbb{Z}_{p+1}$, $p^2+p+1$ is $\hat{1}$, but I can't continue from here.

1

There are 1 best solutions below

1
On

The primes $p$ , for which $p^2+p+1=\frac{p^3-1}{p-1}$ is prime as well, cannot be classified. As mentioned in the comments, we can restrict $p$ , but basically to find the primes, we can only do brute force. There is no way to "predict" whether a prime $p$ does the job.

The Bunyakovsky conjecture implies that infinite many primes $p$ do the job, but it is unknown whether this is the case. In PARI/GP , the following routine calculates the primes upto a given limit :

? forprime(p=1,10^4,if(isprime(p^2+p+1)==1,print1(p," ")))
2 3 5 17 41 59 71 89 101 131 167 173 293 383 677 701 743 761 773 827 839 857 911
 1091 1097 1163 1181 1193 1217 1373 1427 1487 1559 1583 1709 1811 1847 1931 1973
 2129 2273 2309 2339 2411 2663 2729 2789 2957 2969 3011 3041 3137 3221 3251 3407
 3449 3491 3557 3671 3881 3989 4157 4217 4259 4409 4721 4733 4751 4877 4889 4973
 5003 5039 5087 5351 5501 5867 6047 6173 6389 6551 6569 6599 6653 6719 6761 6791
 6833 6917 7013 7229 7253 7547 7883 7901 8093 8231 8237 8387 8501 8543 8627 8669
 8681 8741 8753 8807 8963 9059 9323 9521 9533 9689 9719 9743 9749 9803
?