OFFSET
0,2
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 0..400
S. N. Gladkovskii, Continued fraction expansion for function sec(x) + tan(x), arXiv:1208.2243v1 [math.HO], 2012.
S. N. Gladkovskii, On the continued fraction expansion for functions 1/sin(x) + cot(x) and sec(x) + tan(x), 2012.
Peter Luschny, An old operation on sequences: the Seidel transform.
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 (Abstract, pdf, ps).
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]
N. J. A. Sloane, Transforms.
Wikipedia, Boustrophedon transform.
FORMULA
E.g.f.: (1 + x)*(tan(x) + sec(x)).
From Sergei N. Gladkovskii Dec 03 2012 (Start)
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).
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)
a(n) ~ n! * (Pi + 2)*(2/Pi)^(n+1). - Vaclav Kotesovec, Oct 02 2013
MATHEMATICA
CoefficientList[Series[(1+x)*(Tan[x]+1/Cos[x]), {x, 0, 20}], x]* Range[0, 20]! (* Vaclav Kotesovec, Oct 02 2013 *)
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 *)
PROG
(Sage) # Algorithm of L. Seidel (1877)
def A000756_list(n) :
R = []; A = {-1:1, 0:1}; k = 0; e = 1
for i in (0..n) :
Am = 0; A[k + e] = 0; e = -e
for j in (0..i) : Am += A[k]; A[k] = Am; k += e
R.append(A[-i//2] if i%2 == 0 else A[i//2])
return R
A000756_list(22) # Peter Luschny, May 27 2012
(PARI)
x='x+O('x^66);
Vec(serlaplace((1+x)*(tan(x)+ 1/cos(x))))
/* Joerg Arndt, May 28 2012 */
(Haskell)
a000756 n = sum $ zipWith (*) (a109449_row n) (1 : 1 : [0, 0 ..])
-- Reinhard Zumkeller, Nov 03 2013
(Python)
from itertools import islice, accumulate
def A000756_gen(): # generator of terms
yield from (1, 2)
blist = (1, 2)
while True:
yield (blist:=tuple(accumulate(reversed(blist), initial=0)))[-1]
CROSSREFS
KEYWORD
nonn
AUTHOR
STATUS
approved