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
KEYWORD
nonn
AUTHOR
Najeem Ziauddin, Oct 15 2023
STATUS
approved