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.

A231483 Smallest k > A082467(n) such that n-k and n+k are both prime.

Original entry on oeis.org

9, 8, 15, 18, 7, 12, 15, 10, 15, 18, 7, 28, 15, 10, 27, 12, 7, 24, 15, 8, 21, 18, 5, 30, 15, 8, 27, 24, 11, 18, 9, 10, 15, 30, 13, 18, 15, 10, 21, 30, 7, 42, 21, 10, 33, 18, 7, 30, 21, 10, 9, 18, 11, 30, 27, 8, 33, 24, 11, 48, 21, 8, 21, 30
Offset: 20

Views

Author

Pierre CAMI, Nov 09 2013

Keywords

Comments

Starting at n=20 just because there are some n<20 without solution like for n=19, for the least k (A082467) it start at 4 as no solution for n<4.

Crossrefs

Cf. A082467.

Programs

  • PARI
    a(n) = {k=1; while(isprime(n-k)*isprime(n+k) == 0, k++); k++; while(isprime(n-k)*isprime(n+k) == 0, k++); k; } \\ Michel Marcus, Nov 10 2013