A274609 Primes p such that both 2p-1 and 2p^2-2p+1 are prime.
2, 3, 31, 331, 1171, 2011, 2281, 3181, 4621, 4861, 6151, 6211, 6961, 7951, 8521, 9151, 11251, 12211, 13411, 15661, 17491, 18121, 19141, 20641, 22531, 23071, 23581, 24631, 25411, 26041, 26161, 26431, 26641, 27091, 27271, 27361, 27691, 28201, 28621, 29221, 31891, 33151, 34261, 35491, 36451
Offset: 1
Keywords
Examples
31^2 - 30^2 = 61 and 31^2 + 30^2 = 1861 are both prime.
Links
- Charles R Greathouse IV, Table of n, a(n) for n = 1..10000
Crossrefs
Cf. A047222.
Programs
-
Mathematica
result = {}; Do[If[PrimeQ[2*Prime[i] - 1] && PrimeQ[2*Prime[i]^2 - 2*Prime[i] + 1], AppendTo[result, Prime[i]]], {i, 1, 10000}]; result Select[Prime[Range[4000]],AllTrue[{2#-1,2#^2-2#+1},PrimeQ]&] (* Harvey P. Dale, Dec 26 2022 *)
-
PARI
is(n)=isprime(2*n-1) && isprime(2*n^2-2*n+1) && isprime(n) \\ Charles R Greathouse IV, Jul 15 2016
Comments