A290817 Primes of at least one of the forms p^2 +- p +- 1, where p is prime.
3, 5, 7, 11, 13, 19, 29, 31, 41, 43, 109, 131, 157, 181, 271, 307, 379, 811, 929, 991, 1721, 1723, 2161, 2861, 3539, 3541, 3659, 4421, 4423, 4969, 5113, 6163, 6971, 8009, 8011, 9311, 10099, 10301, 10303, 10711, 16001, 17029, 17291, 17293, 19181, 19183, 22051, 22349, 22651
Offset: 1
Keywords
Links
- Robert Israel, Table of n, a(n) for n = 1..10000
Programs
-
Magma
{p^2+(-1)^k*p+(-1)^s:p in PrimesUpTo(150), s,k in [1..2]|IsPrime(p^2+(-1)^k*p+(-1)^s)}; // Marius A. Burtea, Nov 28 2019
-
Maple
select(isprime, [3,seq(op([p^2-p-1,p^2-p+1,p^2+p-1,p^2+p+1]),p=select(isprime,[seq(i,i=3..1000,2)]))]); # Robert Israel, Nov 27 2019
-
Mathematica
Select[Union[Flatten[{(#^2 + # + 1 ), (#^2 + # - 1 ), (#^2 - # + 1 ), (#^2 - # - 1 )}] &[Prime[Range[100]]]], (PrimeQ[#]) &]
Comments