OFFSET
0,2
LINKS
John Cerkan, Table of n, a(n) for n = 0..482
J. Millar, N. J. A. Sloane and N. E. Young, A new operation on sequences: the Boustrophedon transform, J. Combin. Theory, 17A (1996) 44-54 (Abstract, pdf, ps).
N. J. A. Sloane, Transforms.
FORMULA
E.g.f.: (tan(x) + sec(x))*exp(exp(x) - 1).
EXAMPLE
The array begins:
1
1 -> 2
5 <- 4 <- 2
5 -> 10 -> 14 -> 16
60 <- 55 <- 45 <- 31 <- 15
- John Cerkan, Feb 02 2017
MATHEMATICA
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]; Array[a, 30, 0] (* Jean-François Alcover, Feb 12 2016 *)
PROG
(Python)
from itertools import accumulate, islice
def A000764_gen(): # generator of terms
blist, alist = (1, 2), (1, )
yield from blist
while True:
yield (blist := tuple(accumulate(reversed(blist), initial=(alist := list(accumulate(alist, initial=alist[-1])))[-1])))[-1]
CROSSREFS
KEYWORD
nonn
AUTHOR
STATUS
approved