%I #60 Jun 11 2022 11:44:13
%S 1,2,3,5,13,41,157,699,3561,20401,129881,909523,6948269,57504201,
%T 512516565,4894172027,49851629137,539521049441,6182455849009,
%U 74781598946211,952148890494165,12729293006112121,178281831561868013
%N Boustrophedon transform of sequence 1,1,0,0,0,0,...
%H Reinhard Zumkeller, <a href="/A000756/b000756.txt">Table of n, a(n) for n = 0..400</a>
%H S. N. Gladkovskii, <a href="http://arxiv.org/abs/1208.2243">Continued fraction expansion for function sec(x) + tan(x)</a>, arXiv:1208.2243v1 [math.HO], 2012.
%H S. N. Gladkovskii, <a href="https://www.researchgate.net/publication/232870963">On the continued fraction expansion for functions 1/sin(x) + cot(x) and sec(x) + tan(x)</a>, 2012.
%H Peter Luschny, <a href="http://oeis.org/wiki/User:Peter_Luschny/SeidelTransform">An old operation on sequences: the Seidel transform</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 Ludwig Seidel, <a href="https://www.zobodat.at/pdf/Sitz-Ber-Akad-Muenchen-math-Kl_1877_0157-0187.pdf">Über eine einfache Entstehungsweise der Bernoulli'schen Zahlen und einiger verwandten Reihen</a>, Sitzungsberichte der mathematisch-physikalischen Classe der königlich bayerischen Akademie der Wissenschaften zu München, volume 7 (1877), 157-187. [Access through <a href="https://de.wikipedia.org/wiki/ZOBODAT">ZOBODAT</a>]
%H N. J. A. Sloane, <a href="/transforms.txt">Transforms</a>.
%H Wikipedia, <a href="https://en.wikipedia.org/wiki/Boustrophedon_transform">Boustrophedon transform</a>.
%H <a href="/index/Bo#boustrophedon">Index entries for sequences related to boustrophedon transform</a>
%F E.g.f.: (1 + x)*(tan(x) + sec(x)).
%F From _Sergei N. Gladkovskii_ Dec 03 2012 (Start)
%F E.g.f.: (1 + x)*(1 + x/U(0)); U(k) = 4*k + 1 - x/(2 - x/(4*k + 3 + x/(2 + x/U(k+1) ))); (continued fraction, 4-step).
%F E.g.f.: (1 + x)*(1 + 2*x/(U(0) - x)), where U(k) = 4*k + 2 - x^2/U(k+1); (continued fraction, 1-step). (End)
%F a(n) ~ n! * (Pi + 2)*(2/Pi)^(n+1). - _Vaclav Kotesovec_, Oct 02 2013
%F For n > 0: a(n) = A000111(n) + n*A000111(n-1). - _Reinhard Zumkeller_, Nov 03 2013
%t CoefficientList[Series[(1+x)*(Tan[x]+1/Cos[x]), {x, 0, 20}], x]* Range[0, 20]! (* _Vaclav Kotesovec_, Oct 02 2013 *)
%t t[n_, 0] := If[n < 2, 1, 0]; 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 (Sage) # Algorithm of L. Seidel (1877)
%o def A000756_list(n) :
%o R = []; A = {-1:1, 0:1}; k = 0; e = 1
%o for i in (0..n) :
%o Am = 0; A[k + e] = 0; e = -e
%o for j in (0..i) : Am += A[k]; A[k] = Am; k += e
%o R.append(A[-i//2] if i%2 == 0 else A[i//2])
%o return R
%o A000756_list(22) # Peter Luschny, May 27 2012
%o (PARI)
%o x='x+O('x^66);
%o Vec(serlaplace((1+x)*(tan(x)+ 1/cos(x))))
%o /* _Joerg Arndt_, May 28 2012 */
%o (Haskell)
%o a000756 n = sum $ zipWith (*) (a109449_row n) (1 : 1 : [0, 0 ..])
%o -- _Reinhard Zumkeller_, Nov 03 2013
%o (Python)
%o from itertools import islice, accumulate
%o def A000756_gen(): # generator of terms
%o yield from (1,2)
%o blist = (1,2)
%o while True:
%o yield (blist:=tuple(accumulate(reversed(blist),initial=0)))[-1]
%o A000756_list = list(islice(A000756_gen(),40)) # _Chai Wah Wu_, Jun 09-11 2022
%Y Cf. A109449.
%K nonn
%O 0,2
%A _N. J. A. Sloane_