OFFSET
0,2
COMMENTS
Boustrophedon transform of A000124 (central polygonal numbers).
MATHEMATICA
nmax = 23; CoefficientList[Series[Exp[x] (1 + x + x^2/2) (Sec[x] + Tan[x]), {x, 0, nmax}], x] Range[0, nmax]!
t[n_, 0] := n (n + 1)/2 + 1; t[n_, k_] := t[n, k] = t[n, k - 1] + t[n - 1, n - k]; a[n_] := t[n, n]; Array[a, 24, 0]
PROG
(Python)
from itertools import count, islice, accumulate
def A308520_gen(): # generator of terms
blist = tuple()
for i in count(0):
yield (blist := tuple(accumulate(reversed(blist), initial=i*(i+1)//2+1)))[-1]
CROSSREFS
KEYWORD
nonn
AUTHOR
Ilya Gutkovskiy, Jun 04 2019
STATUS
approved