OFFSET
1,2
COMMENTS
Mirroring the idea in A048457, here with nonprimes, and including 1 of the first generation.
We write down the sequence of the nonprimes 1, 4, 6, ... in the first row of the array. Nonprime(k) + nonprime(k+2) will generate the second row. Thereafter we generate the further rows in a similar manner. The leftmost diagonal gives the sequence.
LINKS
Michael S. Branicky, Table of n, a(n) for n = 1..3311
EXAMPLE
1 4 6 8 9 10 12 14 15 16 18 20 21 ...
7 12 15 18 21 24 27 30 33 36 39 ...
22 30 36 42 48 54 60 66 72 ...
58 72 84 96 108 120 132 ...
142 168 192 216 240 ...
334 384 432 ...
766 ...
PROG
(Python)
from sympy import composite
from functools import lru_cache
@lru_cache(maxsize=None)
def T(r, k):
if r == 1: return 1 if k == 1 else composite(k-1)
return T(r-1, k) + T(r-1, k+2)
def a(n): return T(n, 1)
print([a(n) for n in range(1, 30)]) # Michael S. Branicky, May 28 2022
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Tamas Sandor Nagy, May 27 2022
EXTENSIONS
a(8) and beyond from Michael S. Branicky, May 28 2022
STATUS
approved