login
A366644
Primes p such that p + q +- 1 and p^3 + q^3 +- 1 are twin prime pairs, where q = nextprime(p).
0
1693, 3329, 3469, 13523, 23899, 24551, 33589, 37579, 44221, 47459, 75659, 81929, 91009, 103981, 136621, 195493, 365293, 637669, 652573, 787513, 842341, 902449, 1181053, 1290319, 1291603, 1349683, 1802641, 1858891, 1869709, 1870441, 1978411, 2295121, 2414771
OFFSET
1,1
EXAMPLE
1693 is in the sequence since
1693 + 1697 - 1 = 3389 is prime,
1693 + 1697 + 1 = 3391 is prime,
1693^3 + 1697^3 - 1 = 9739595429 is prime, and
1693^3 + 1697^3 + 1 = 9739595431 is prime.
3329 is in the sequence since
3329 + 3331 - 1 = 6659 is prime,
3329 + 3331 + 1 = 6661 is prime,
3329^3 + 3331^3 - 1 = 73852093979 is prime, and
3329^3 + 3331^3 + 1 = 73852093981 is prime.
PROG
(PARI) isok(p)={if(isprime(p), my(q=nextprime(p+1), y=p+q, z=p^3+q^3); isprime(y-1) && isprime(y+1) && isprime(z-1) && isprime(z+1), 0)}
{ forprime(p=1, 3*10^6, if(isok(p), print1(p, ", "))) } \\ Andrew Howroyd, Oct 15 2023
CROSSREFS
Cf. A000040.
Sequence in context: A089674 A252429 A126720 * A325884 A224605 A252570
KEYWORD
nonn
AUTHOR
Najeem Ziauddin, Oct 15 2023
STATUS
approved