OFFSET
0,3
COMMENTS
Boustrophedon transform of A000166.
MATHEMATICA
nmax = 22; CoefficientList[Series[(Sec[x] + Tan[x]) Exp[-x]/(1 - x), {x, 0, nmax}], x] Range[0, nmax]!
t[n_, 0] := (-1)^n HypergeometricPFQ[{-n, 1}, {}, 1]; t[n_, k_] := t[n, k] = t[n, k - 1] + t[n - 1, n - k]; a[n_] := t[n, n]; Array[a, 23, 0]
PROG
(Python)
from itertools import accumulate, count, islice
def A307594_gen(): # generator of terms
blist, a, b = tuple(), 1, -1
for n in count(1):
yield (blist := tuple(accumulate(reversed(blist), initial=a)))[-1]
a, b = a*n+b, -b
CROSSREFS
KEYWORD
nonn
AUTHOR
Ilya Gutkovskiy, Apr 17 2019
STATUS
approved