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.

A065978 For even k >= 4, let f(k) = A066285(k/2) be the minimal difference between primes p and q whose sum is k. Such a k is in the sequence if f(k) > f(m) for all even m with 4 <= m < k.

Original entry on oeis.org

4, 8, 16, 44, 92, 242, 256, 272, 292, 476, 530, 572, 682, 688, 1052, 1808, 2228, 3382, 3472, 3502, 3562, 4952, 6194, 7102, 10262, 17008, 20684, 37052, 45128, 49552, 80144, 137414, 251806, 349826, 362534, 742856, 1655152, 1872236, 2108282, 2319728, 2707118
Offset: 1

Views

Author

Jon Perry, Dec 09 2001

Keywords

Comments

The values of f(a(n)) (given in A066286) appear to be divisible by 6, except the first two.

Examples

			4 = 2+2; the gap is 0. 6=3+3 (0). 8=3+5; the gap is 2, and this is the largest gap to date, so 8 is in the sequence.
10=5+5 (0), 12=5+7 (2), 14=7+7 (0), 16=5+11 (6), so 16 is in the sequence.
		

Crossrefs

Programs

  • Mathematica
    f[n_] := For[p=n/2, True, p--, If[PrimeQ[p]&&PrimeQ[n-p], Return[n-2p]]]; For[n=4; max=-1, True, n+=2, If[f[n]>max, Print[n]; max=f[n]]]

Extensions

More terms from Robert G. Wilson v and Dean Hickerson, Dec 10 2001
Changed offset to 1 (this is a list). - N. J. A. Sloane, Sep 07 2013