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.

A114229 Smallest number m such that A114228(m) = n.

Original entry on oeis.org

2, 3, 34, 10, 47, 20, 46, 52, 221, 462, 92, 77, 619, 94, 319, 2176, 263, 154, 700, 1980, 1336, 928, 2477, 3243, 428, 461, 2146, 4224, 1456, 2735, 3373, 5319, 6439, 4522, 4508, 4516, 11073, 1814, 9940, 10746, 17523, 6680, 16409, 10023, 16107, 14289
Offset: 1

Views

Author

Lei Zhou, Nov 18 2005

Keywords

Comments

Sequence is defined for all n>=1.
A114228(a(n)) = n and A114228(m) <> n for m < a(n).

Crossrefs

Programs

  • Haskell
    import Data.List (elemIndex); import Data.Maybe (fromJust)
    a114229 = (+ 2) . fromJust . (`elemIndex` (map a114228 [2..]))
    -- Reinhard Zumkeller, Oct 31 2013
  • Mathematica
    Do[ns[k] = 0, {k, 1, 2000}]; n2 = 0; n1 = 1; While[n2 <= 200, n1++; p1 = Prime[n1]; n2 = 1; p2 = 2; While[cp = p1 + 2*p2; ! PrimeQ[cp], n2++; p2 = Prime[n2]]; If[ns[n2] == 0, ns[n2] = n1; Print[n2, "[", n1, "]"]]]; Table[ns[k], {k, 1, n2}]

Extensions

Edited definition to conform to OEIS style. - Reinhard Zumkeller, Oct 31 2013