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.

A064213 Least k such that k*3^n +- 1 are twin primes.

Original entry on oeis.org

4, 2, 2, 4, 10, 40, 58, 64, 28, 24, 8, 210, 70, 36, 12, 4, 78, 26, 28, 20, 90, 30, 10, 630, 210, 70, 82, 416, 612, 204, 68, 930, 310, 406, 1078, 1164, 388, 176, 190, 334, 190, 726, 242, 1004, 398, 1430, 1372, 2730, 910, 1560, 520
Offset: 0

Views

Author

Robert G. Wilson v, Sep 21 2001

Keywords

Comments

k must be even because 3^n is odd. - Harry J. Smith, Sep 10 2009

Crossrefs

Cf. A063983.

Programs

  • Mathematica
    Do[ k = 1; While[ ! PrimeQ[ k*3^n + 1 ] || ! PrimeQ[ k*3^n - 1 ], k++ ]; Print[ k ], {n, 0, 50} ]
  • PARI
    { for (n=0, 225, k=0; p=3^n; until (isprime(k*p - 1) && isprime(k*p + 1), k+=2); write("b064213.txt", n, " ", k); ) } \\ Harry J. Smith, Sep 10 2009

Extensions

Offset changed from 1 to 0 by Harry J. Smith, Sep 10 2009