A308520 Expansion of e.g.f. exp(x)*(1 + x + x^2/2)*(sec(x) + tan(x)).
1, 3, 9, 27, 84, 287, 1116, 4984, 25368, 145277, 924684, 6475018, 49464756, 409371731, 3648595216, 34841512504, 354892721168, 3840839273849, 44012775982132, 532368664987942, 6778328366073724, 90619575089479631, 1269184691838666152, 18583725601041230532
Offset: 0
Keywords
Programs
-
Mathematica
nmax = 23; CoefficientList[Series[Exp[x] (1 + x + x^2/2) (Sec[x] + Tan[x]), {x, 0, nmax}], x] Range[0, nmax]! 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]
-
Python
from itertools import count, islice, accumulate def A308520_gen(): # generator of terms blist = tuple() for i in count(0): yield (blist := tuple(accumulate(reversed(blist),initial=i*(i+1)//2+1)))[-1] A308520_list = list(islice(A308520_gen(),30)) # Chai Wah Wu, Jun 11 2022
Comments