cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A366644 Primes p such that p + q +- 1 and p^3 + q^3 +- 1 are twin prime pairs, where q = nextprime(p).

Original entry on oeis.org

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

Views

Author

Najeem Ziauddin, Oct 15 2023

Keywords

Examples

			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.
		

Crossrefs

Cf. A000040.

Programs

  • 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