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.

A133266 a(1) = 30; for n >= 2, choose smallest a(n) so that no sum of 2 or more terms equals a prime.

Original entry on oeis.org

30, 32, 33, 52, 60, 63, 90, 120, 150, 180, 210, 240, 270, 300, 330, 360, 390, 420, 450, 480, 510, 540, 570, 600, 630, 660, 690, 720, 750, 780
Offset: 1

Views

Author

Robert G. Wilson v, Jan 01 2008

Keywords

Crossrefs

Programs

  • Mathematica
    (* first do *) Needs [ "Combinatorica`" ] (* then *) lst = {30}; g [ k_ ] := Block [ {j = 1, l = 2^Length@ lst}, While [ j < l && !PrimeQ [ Plus @@ NthSubset [ j, lst ] + k ], j++ ]; If [ j == l, False, True ] ]; f [ n_ ] := Block [ {k = lst [ [ -1 ] ] + 1}, While [ g@k == True, k++ ]; AppendTo [ lst, k ]; k ]; Do [ Print@ f@n, {n, 30} ]

Formula

a(n+1) = a(n) + 30 for n >= 7 (conjectured). - Chai Wah Wu, Feb 15 2020