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.

A104884 Records in A104883.

Original entry on oeis.org

4, 5, 8, 24, 54, 117, 222, 258, 291, 591, 888, 951, 1656, 1674, 2451, 2577, 4212, 4857, 6597, 7398, 10758, 10950, 11601, 19608, 20604, 27411, 35157, 43338, 45174, 46920, 53412, 71661, 90699, 96681, 107385, 123051, 130782, 189741, 225747, 273738, 288096, 362781
Offset: 1

Views

Author

Keywords

Comments

a(k) has the largest equal 'gap' between the nearest primes so far, i.e.; (the sum of the two nearest primes)/2 equals a(k).

Crossrefs

Programs

  • Mathematica
    f[n_] := Block[{k}, If[ OddQ[n], k = 2, k = 1]; While[ !PrimeQ[n - k] || !PrimeQ[n + k], k += 2]; k]; t = Table[f[n], {n, 4, 10^4}];u = Table[0, {80}]; Do[a = t[[n]]; If[a < 81 && u[[a]] == 0, u[[a]] = n + 3], {n, 10^4}]; a = 0; lst = {}; Do[ If[u[[n]] > a, a = u[[n]]; AppendTo[lst, a]], {n, 80}]; lst