login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A062272
Boustrophedon transform of (n+1) mod 2.
9
1, 1, 2, 5, 12, 41, 152, 685, 3472, 19921, 126752, 887765, 6781632, 56126201, 500231552, 4776869245, 48656756992, 526589630881, 6034272215552, 72989204937125, 929327412759552, 12424192360405961, 174008703107274752
OFFSET
0,3
LINKS
J. Millar, N. J. A. Sloane, and N. E. Young, A new operation on sequences: the Boustrophedon transform, J. Combin. Theory Ser. A, 76(1) (1996), 44-54 (Abstract, pdf, ps).
J. Millar, N. J. A. Sloane, and N. E. Young, A new operation on sequences: the Boustrophedon transform, J. Combin. Theory Ser. A, 76(1) (1996), 44-54.
Ludwig Seidel, Über eine einfache Entstehungsweise der Bernoulli'schen Zahlen und einiger verwandten Reihen, Sitzungsberichte der mathematisch-physikalischen Classe der königlich bayerischen Akademie der Wissenschaften zu München, volume 7 (1877), 157-187. [USA access only through the HATHI TRUST Digital Library]
Ludwig Seidel, Über eine einfache Entstehungsweise der Bernoulli'schen Zahlen und einiger verwandten Reihen, Sitzungsberichte der mathematisch-physikalischen Classe der königlich bayerischen Akademie der Wissenschaften zu München, volume 7 (1877), 157-187. [Access through ZOBODAT]
FORMULA
E.g.f.: (sec(x)+tan(x))cosh(x); a(n)=(A000667(n)+A062162(n))/2. - Paul Barry, Jan 21 2005
a(n) = Sum{k, k>=0} binomial(n, 2k)*A000111(n-2k). - Philippe Deléham, Aug 28 2005
a(n) = sum(A109449(n,k) * (1 - n mod 2): k=0..n). - Reinhard Zumkeller, Nov 03 2013
MATHEMATICA
s[n_] = Mod[n+1, 2]; t[n_, 0] := s[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
(Sage) # Generalized algorithm of L. Seidel (1877)
def A062272_list(n) :
R = []; A = {-1:0, 0:0}
k = 0; e = 1
for i in range(n) :
Am = 1 if e == 1 else 0
A[k + e] = 0
e = -e
for j in (0..i) :
Am += A[k]
A[k] = Am
k += e
R.append(A[e*i//2])
return R
A062272_list(10) # Peter Luschny, Jun 02 2012
(Haskell)
a062272 n = sum $ zipWith (*) (a109449_row n) $ cycle [1, 0]
-- Reinhard Zumkeller, Nov 03 2013
(Python)
from itertools import accumulate, islice
def A062272_gen(): # generator of terms
blist, m = tuple(), 0
while True:
yield (blist := tuple(accumulate(reversed(blist), initial=(m := 1-m))))[-1]
A062272_list = list(islice(A062272_gen(), 40)) # Chai Wah Wu, Jun 12 2022
CROSSREFS
A000734 (binomial transform), a(2n+1)= A003719(n), a(2n)= A000795(n),
Cf. A062161 (n mod 2).
Row sums of A162170 minus A000035. - Mats Granvik, Jun 27 2009
Cf. A059841.
Sequence in context: A005664 A364761 A009739 * A215789 A127137 A172239
KEYWORD
nonn,easy
AUTHOR
Frank Ellermann, Jun 16 2001
STATUS
approved