%I #30 Jun 12 2022 12:23:09
%S 1,2,5,16,60,258,1247,6686,39371,252688,1756920,13168178,105949517,
%T 911834394,8367625793,81642384468,844718036940,9245285569526,
%U 106790005796627,1298920385093126,16602066548692623
%N Boustrophedon transform of Bell numbers.
%H John Cerkan, <a href="/A000764/b000764.txt">Table of n, a(n) for n = 0..482</a>
%H 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 (<a href="http://neilsloane.com/doc/bous.txt">Abstract</a>, <a href="http://neilsloane.com/doc/bous.pdf">pdf</a>, <a href="http://neilsloane.com/doc/bous.ps">ps</a>).
%H N. J. A. Sloane, <a href="/transforms.txt">Transforms</a>.
%H <a href="/index/Bo#boustrophedon">Index entries for sequences related to boustrophedon transform</a>
%F E.g.f.: (tan(x) + sec(x))*exp(exp(x) - 1).
%e The array begins:
%e 1
%e 1 -> 2
%e 5 <- 4 <- 2
%e 5 -> 10 -> 14 -> 16
%e 60 <- 55 <- 45 <- 31 <- 15
%e - _John Cerkan_, Feb 02 2017
%t 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 *)
%o (Python)
%o from itertools import accumulate, islice
%o def A000764_gen(): # generator of terms
%o blist, alist = (1,2), (1,)
%o yield from blist
%o while True:
%o yield (blist := tuple(accumulate(reversed(blist),initial=(alist := list(accumulate(alist, initial=alist[-1])))[-1])))[-1]
%o A000764_list = list(islice(A000764_gen(),40)) # _Chai Wah Wu_, Jun 12 2022
%Y Cf. A000110.
%K nonn
%O 0,2
%A _N. J. A. Sloane_