OFFSET
0,5
COMMENTS
Inverse boustrophedon transform of Bell numbers.
MATHEMATICA
nmax = 24; CoefficientList[Series[Exp[Exp[x] - 1]/(Sec[x] + Tan[x]), {x, 0, nmax}], x] Range[0, nmax]!
t[n_, 0] := BellB[n]; t[n_, k_] := t[n, k] = t[n, k - 1] - t[n - 1, n - k]; a[n_] := t[n, n]; Table[a[n], {n, 0, 24}]
PROG
(Python)
from itertools import islice, accumulate
from operator import sub
def A337447_gen(): # generator of terms
yield from (1, 0)
blist, alist = (1, 0), (1, )
while True:
yield (blist := tuple(accumulate(reversed(blist), func=sub, initial=(alist := list(accumulate(alist, initial=alist[-1])))[-1])))[-1]
CROSSREFS
KEYWORD
sign
AUTHOR
Ilya Gutkovskiy, Aug 27 2020
STATUS
approved