login
A029582
E.g.f. sin(x) + cos(x) + tan(x).
3
1, 2, -1, 1, 1, 17, -1, 271, 1, 7937, -1, 353791, 1, 22368257, -1, 1903757311, 1, 209865342977, -1, 29088885112831, 1, 4951498053124097, -1, 1015423886506852351, 1, 246921480190207983617, -1, 70251601603943959887871, 1, 23119184187809597841473537
OFFSET
0,2
FORMULA
G.f.: (1+x)/(1+x^2)+x/T(0) where T(k)= 1 - (k+1)*(k+2)*x^2/T(k+1) ; (recursively defined continued fraction). - Sergei N. Gladkovskii, Feb 12 2013
G.f.: (1+x)/(1+x^2)+x/G(0) where G(k) = 1 - 2*x^2*(4*k^2+4*k+1) - 4*x^4*(k+1)^2*(4*k^2+8*k+3)/G(k+1); (recursively defined continued fraction). - Sergei N. Gladkovskii, Feb 12 2013
MATHEMATICA
nn = 30; Range[0, nn]! CoefficientList[Series[Tan[x] + Sin[x] + Cos[x], {x, 0, nn}], x] (* T. D. Noe, Jul 16 2012 *)
PROG
(Sage) # Variant of an algorithm of L. Seidel (1877).
def A029582_list(n) :
dim = 2*n; E = matrix(ZZ, dim); E[0, 0] = 1
for m in (1..dim-1) :
if m % 2 == 0 :
E[m, 0] = 1;
for k in range(m-1, -1, -1) :
E[k, m-k] = E[k+1, m-k-1] - E[k, m-k-1]
else :
E[0, m] = 1;
for k in range(1, m+1, 1) :
E[k, m-k] = E[k-1, m-k+1] + E[k-1, m-k]
return [(-1)^(k//2)*E[k, 0] for k in range(dim)]
A029582_list(15) # Peter Luschny, Jul 14 2012
CROSSREFS
Sequence in context: A358722 A256688 A372326 * A067095 A070888 A180849
KEYWORD
sign
AUTHOR
STATUS
approved