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.

A129314 Records in A127356.

Original entry on oeis.org

1, 2, 6, 12, 24, 30, 42, 54, 60, 66, 90, 132, 138, 210, 270, 300, 318, 342, 390, 420, 450, 624, 690, 696, 750, 798, 924, 930, 1170, 1224, 1326, 1362, 1428, 1434, 1500
Offset: 1

Views

Author

Klaus Brockhaus, Apr 09 2007

Keywords

Examples

			As can be gathered from A127356, the first six records are A127356(1) = 1, A127356(2) = 2, A127356(3) = 6, A127356(10) = 12, A127356(13) = 24, A127356(77) = 30. Hence a(1) to a(6) are 1, 2, 6, 12, 24, 30.
		

Crossrefs

Cf. A127356, A129315 (where records occur).

Programs

  • Mathematica
    sk[n_]:=Module[{k=2},While[!PrimeQ[n+k^2],k=k+2];k];DeleteDuplicates[ Join[ {1},Table[sk[n],{n,Prime[Range[2,1000000]]}]],GreaterEqual] (* The program generates the first 22 terms of the sequence. *) (* Harvey P. Dale, Nov 07 2022 *)
  • Python
    from itertools import count, islice
    from sympy import isprime, nextprime, prime
    def agen():
        pn = 2; record = 1; yield record
        for n in count(2):
            k, pn = 2, nextprime(pn)
            while not isprime(pn + k*k): k += 2
            if k > record: record = k; yield record
    print(list(islice(agen(), 20))) # Michael S. Branicky, Nov 11 2022

Extensions

a(27)-a(33) from Donovan Johnson, Dec 09 2008
a(34)-a(35) from Michael S. Branicky, Nov 11 2022