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.

A115206 Least number d such that prime(n) -/+ 2d form a prime pair; prime(n) being the n-th prime.

Original entry on oeis.org

1, 2, 3, 3, 3, 6, 3, 6, 6, 3, 6, 12, 3, 3, 6, 9, 3, 6, 3, 9, 12, 9, 15, 6, 3, 3, 15, 12, 12, 9, 15, 6, 9, 6, 3, 18, 15, 3, 6, 9, 21, 15, 15, 21, 6, 30, 15, 24, 3, 6, 15, 6, 3, 3, 6, 21, 3, 6, 27, 12, 12, 21, 18, 18, 9, 15, 18, 9, 3, 21, 15, 3, 15, 18, 15, 12, 9, 6, 15, 6, 6, 12, 9, 12, 9, 42, 9
Offset: 3

Views

Author

Lekraj Beedassy, Mar 04 2006

Keywords

Crossrefs

Cf. A078611.

Programs

  • Mathematica
    f[n_] := Block[{k = 1, p = Prime@n}, While[ !PrimeQ[p - 2k] || !PrimeQ[p + 2k], k++ ]; k]; Table[f[n], {n, 3, 90}] (* Robert G. Wilson v, Mar 14 2006 *)

Formula

a(n) = A078611(n)/2.

Extensions

Corrected by N. J. A. Sloane, Mar 05 2006
More terms from Robert G. Wilson v, Mar 14 2006