login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

Expansion of e.g.f. exp(x)*(1 + x + x^2/2)*(sec(x) + tan(x)).
0

%I #8 Jun 11 2022 20:16:49

%S 1,3,9,27,84,287,1116,4984,25368,145277,924684,6475018,49464756,

%T 409371731,3648595216,34841512504,354892721168,3840839273849,

%U 44012775982132,532368664987942,6778328366073724,90619575089479631,1269184691838666152,18583725601041230532

%N Expansion of e.g.f. exp(x)*(1 + x + x^2/2)*(sec(x) + tan(x)).

%C Boustrophedon transform of A000124 (central polygonal numbers).

%H <a href="/index/Bo#boustrophedon">Index entries for sequences related to boustrophedon transform</a>

%t nmax = 23; CoefficientList[Series[Exp[x] (1 + x + x^2/2) (Sec[x] + Tan[x]), {x, 0, nmax}], x] Range[0, nmax]!

%t 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]

%o (Python)

%o from itertools import count, islice, accumulate

%o def A308520_gen(): # generator of terms

%o blist = tuple()

%o for i in count(0):

%o yield (blist := tuple(accumulate(reversed(blist),initial=i*(i+1)//2+1)))[-1]

%o A308520_list = list(islice(A308520_gen(),30)) # _Chai Wah Wu_, Jun 11 2022

%Y Cf. A000111, A000124, A000718, A000746.

%K nonn

%O 0,2

%A _Ilya Gutkovskiy_, Jun 04 2019