|
|
A000660
|
|
Boustrophedon transform of 1,1,2,3,4,5,...
|
|
3
|
|
|
1, 2, 5, 14, 41, 136, 523, 2330, 11857, 67912, 432291, 3027166, 23125673, 191389108, 1705788659, 16289080922, 165919213089, 1795666675824, 20576824369027, 248892651678198, 3168999664907705, 42366404751871660
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,2
|
|
LINKS
|
J. Millar, N. J. A. Sloane and N. E. Young, A new operation on sequences: the Boustrophedon transform, J. Combin. Theory, 17A 44-54 1996 (Abstract, pdf, ps).
|
|
FORMULA
|
|
|
MAPLE
|
seq(coeff(series(factorial(n)*(x*exp(x)+1)*(sec(x)+tan(x)), x, n+1), x, n), n=0..25); # Muniru A Asiru, Jul 30 2018
|
|
MATHEMATICA
|
a[n_] := n! SeriesCoefficient[(1+x Exp[x])(1+Sin[x])/Cos[x], {x, 0, n}];
|
|
PROG
|
(Sage) # Algorithm of L. Seidel (1877)
R = []; A = {-1:0, 0:1}
k = 0; e = 1
for i in range(n) :
Am = i
A[k + e] = 0
e = -e
for j in (0..i) :
Am += A[k]
A[k] = Am
k += e
print([A[z] for z in (-i//2..i//2)])
R.append(A[e*i//2])
return R
(Haskell)
a000660 n = sum $ zipWith (*) (a109449_row n) (1 : [1..])
(Python)
from itertools import accumulate, count, islice
def A000660_gen(): # generator of terms
yield 1
blist = (1, )
for i in count(1):
yield (blist := tuple(accumulate(reversed(blist), initial=i)))[-1]
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|