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.

A178698 Largest k

Original entry on oeis.org

0, 1, 0, 3, 4, 5, 4, 6, 7, 4, 0, 2, 7, 0, 5, 13, 15, 16, 13, 9, 11, 15, 20, 21, 18, 19, 25, 17, 0, 2, 21, 0, 19, 23, 25, 29, 23, 27, 28, 29, 39, 23, 14, 16, 38, 39, 40, 37, 38, 39, 32, 0, 1, 29, 30, 31, 28, 29, 30, 23, 24, 25, 26, 35, 22, 23, 38, 39, 40, 50, 57, 43, 44, 54, 32
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Dec 26 2010, Dec 31 2010

Keywords

Examples

			a(1)=0 because 2*composite(1)=composite(1-0)+composite(1+0)=4+4=8.
		

Crossrefs

Cf. A002808 (composite numbers), A178609 (prime version).

Programs

  • Mathematica
    Composite[n_Integer] := FixedPoint[n + PrimePi@# + 1 &, n + PrimePi@ n + 1]; f[n_] := Block[{k = n - 1, m = Composite@ n}, While[k > 0 && 2 m != Composite[n + k] + Composite[n - k], k--]; k]; Array[f, 75]