OFFSET
0,3
COMMENTS
For a refinement of these numbers see A185896.
A signed permutation is a sequence (x_1,x_2,...,x_n) of integers such that {|x_1|,|x_2|,...|x_n|} = {1,2...,n}. Let x_1,...,x_n be a signed permutation. Then we say 0,x_1,...,x_n,0 is a snake of type S(n;0,0) when 0 < x_1 > x_2 < ... 0. For example, 0 4 -3 -1 -2 0 is a snake of type S(4;0,0). Then a(n) equals the cardinality of S(n;0,0) [Verges]. An example is given below. - Peter Bala, Sep 02 2011
Original name was: E.g.f. cos(x)*(cos(x)+sin(x)) /cos(2*x). - Arkadiusz Wesolowski, Jul 25 2012
Number of plane (that is, ordered) increasing 0-1-2 trees on n vertices where the vertices of outdegree 1 or 2 come in two colors. An example is given below. - Peter Bala, Oct 10 2012
LINKS
R. J. Mathar, Table of n, a(n) for n = 0..200
Paul Barry, Series reversion with Jacobi and Thron continued fractions, arXiv:2107.14278 [math.NT], 2021.
F. Bergeron, Ph. Flajolet and B. Salvy, Varieties of Increasing Trees, Lecture Notes in Computer Science vol. 581, ed. J.-C. Raoult, Springer 1992, pp. 24-48.
D. Dumont, Further triangles of Seidel-Arnold type and continued fractions related to Euler and Springer numbers, Adv. Appl. Math., 16 (1995), 275-296.
Wiktor Ejsmont and Franz Lehner, The Free Tangent Law, arXiv:2004.02679 [math.OA], 2020.
M. Josuat-Verges, Enumeration of snakes and cycle-alternating permutations, arXiv:1011.0929 [math.CO], 2010.
Vladimir Kruchinin, Composition of ordinary generating functions, arXiv:1009.2565 [math.CO], 2010.
FORMULA
E.g.f.: 1/(1- tan(x)). - Emeric Deutsch, Sep 10 2001
a(n) = A000831(n)/2 for n>0. - Peter Luschny, Nov 25 2010
a(n) = sum(evenp(n+k), k=1..n, (-1)^((n+k)/2)*sum(j=k..n, j!/n!*stirling2(n,j)*2^(n-j)*(-1)^(n+j-k)*binomial(j-1,k-1)), n>0. - Vladimir Kruchinin, Aug 18 2010
a(n) = (-1)^((n^2-n)/2)*4^n*(E_{n}(1/2)+E_{n}(1))/2 for n >= 0, where E_{n}(x) is an Euler polynomial. - Peter Luschny, Nov 25 2010
From Peter Bala, Sep 02 2011: (Start)
a(n) = (2*i)^(n-1)*Sum_{k = 1..n} (-1)^(n-k)*k!* Stirling2(n,k) * ((1-i)/2)^(k-1), where i = sqrt(-1).
a(n) = 2^(n-1)*A000111(n) for n >= 1.
Let f(x) = 1+x^2 and define the effect of the operator D on a function g(x) by D(g(x)) = d/dx(f(x)*g(x)). Then for n >= 0, a(n+1) = D^n(1) evaluated at x = 1. (End)
From Sergei N. Gladkovskii, Dec 09 2011 - Dec 23 2013: (Start) Continued fractions:
E.g.f.: 1 + x/(G(0)-x); G(k) = 2*k + 1 - (x^2)/G(k+1).
E.g.f.: 1 + x/(U(0)-2*x) where U(k) = 4*k+1 + x/(1+x/(4*k+3 - x/(1- x/U(k+1)))).
E.g.f.: 1 + x/(U(0)-x) where U(k) = 2*k+1 - x^2/U(k+1).
G.f.: 1 + x/G(0) where G(k) = 1 - x*(2*k+2) - 2*x^2*(k+1)*(k+2)/G(k+1).
E.g.f.: 1 + x/T(0) where T(k) = 4*k+1 - x/(1 - x/(4*k+3 + x/(1 + x/T(k+1)))).
G.f.: 1 + x/Q(0) where Q(k) = 1 - 2*x*(2*k+1) - 2*x^2*(2*k+1)*(2*k+2)/(1 - 2*x*(2*k+2) - 2*x^2*(2*k+2)*(2*k+3)/Q(k+1)).
G.f.: 1 + x/(1-2*x)*T(0) where T(k) = 1 - 2*x^2*(k+1)*(k+2)/( 2*x^2*(k+1)*(k+2) - (1 - 2*x*(k+1))*(1 - 2*x*(k+2))/T(k+1)).
E.g.f.: T(0) where T(k) = 1 + x/(4*k+1 - x/(1 - x/( 4*k+3 + x/T(k+1)))). (End)
G.f.: 1 /(1 - 1*x /(1 - 1*x /(1 - 4*x /(1 - 2*6*x^2 /(1 - 6*x /(1 - 4*x /(1 - 4*x /(1 - 10*x /(1 - 5*12*x^2 /(1 - 12*x / ...)))))))))). - Michael Somos, May 12 2012
a(n) ~ n! * 2^(2*n+1)/Pi^(n+1). - Vaclav Kotesovec, Jun 21 2013
a(0) = a(1) = 1; a(n) = 2 * Sum_{k=1..n-1} binomial(n-1,k) * a(k) * a(n-k-1). - Ilya Gutkovskiy, Nov 21 2020
From Peter Bala, Dec 04 2021: (Start)
F(x) = exp(2*x)*(exp(2*x) - 1)/(exp(4*x) + 1) = x + 2*x^2/2! - 8*x^3/3! - 40*x^4/4! + 256*x^5/5! + 1952*x^6/6! - - + + ... is the e.g.f. for the sequence [1, 2, -8, -40, 256, 1952, ...], a signed version of this sequence without the first term.
Let G(x) = x + 2*x^2 - 8*x^3 - 40*x^4 + 256*x^5 + 1952*x^6 - - + + ... be the corresponding o.g.f. We have the continued fraction representation G(x) = x/(1 - 2*x + 12*x^2/(1 + 20*x^2/(1 - 2*x + 56*x^2/(1 + 72*x^2/(1 - 2*x + ... + 4*n*(4*n-1)*x^2/(1 + 4*n*(4*n+1)*x^2/(1 - 2*x + ... ))))))).
The inverse binomial transform 1/(1 + x)*G(x/(1 + x)) = x - 11*x^3 + 361*x^5 - 24611*x^7 + - ... is a g.f. for a signed and aerated version of A000464. (End)
EXAMPLE
a(3) = 8: The eight snakes of type S(3;0,0) are
0 1 -2 3 0, 0 1 -3 2 0, 0 2 1 3 0, 0 2 -1 3 0, 0 2 -3 1 0,
0 3 1 2 0, 0 3 -1 2 0, 0 3 -2 1 0.
1 + x + 2*x^2 + 8*x^3 + 40*x^4 + 256*x^5 + 1952*x^6 + 17408*x^7 + ...
a(3) = 8: The eight increasing 0-1-2 trees on 3 vertices are
..1o (x2 colors)......1o (x2 colors)......1o (x2 colors).....
...|................./.\................./.\.................
..2o (x2 colors)...2o...o3.............3o...o2...............
...|
..3o
Totals.......................................................
...4......+...........2.........+.........2....=...8.........
MAPLE
A000828 := n -> (-1)^((n-1)*n/2)*4^n*(Euler(n, 1/2)+Euler(n, 1))/2: # Peter Luschny, Nov 25 2010
MATHEMATICA
a[n_] := (-1)^((n-1)*n/2)*4^n*(EulerE[n, 1/2] + EulerE[n, 1])/2; Table[a[n], {n, 0, 19}] (* Jean-François Alcover, Nov 22 2012, after Peter Luschny *)
PROG
(Maxima) a(n):=sum(if evenp(n+k) then (-1)^((n+k)/2)*sum(j!/n!*stirling2(n, j)*2^(n-j)*(-1)^(n+j-k)*binomial(j-1, k-1), j, k, n), k, 1, n); /* Vladimir Kruchinin, Aug 18 2010 */
(PARI) my(x='x + O('x^30)); Vec(serlaplace(cos(x)/(cos(x)-sin(x)))) \\ Michel Marcus, Nov 21 2020
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
EXTENSIONS
Name changed by Arkadiusz Wesolowski, Jul 25 2012
STATUS
approved