A185896 Triangle of coefficients of (1/sec^2(x))*D^n(sec^2(x)) in powers of t = tan(x), where D = d/dx.
1, 0, 2, 2, 0, 6, 0, 16, 0, 24, 16, 0, 120, 0, 120, 0, 272, 0, 960, 0, 720, 272, 0, 3696, 0, 8400, 0, 5040, 0, 7936, 0, 48384, 0, 80640, 0, 40320, 7936, 0, 168960, 0, 645120, 0, 846720, 0, 362880, 0, 353792, 0, 3256320, 0, 8951040, 0, 9676800, 0, 3628800
Offset: 0
Examples
Table begins n\k|.....0.....1.....2.....3.....4.....5.....6 ============================================== 0..|.....1 1..|.....0.....2 2..|.....2.....0.....6 3..|.....0....16.....0....24 4..|....16.....0...120.....0...120 5..|.....0...272.....0...960.....0...720 6..|...272.....0..3696.....0..8400.....0..5040 Examples of recurrence relation T(4,2) = 3*(T(3,1) + T(3,3)) = 3*(16 + 24) = 120; T(6,4) = 5*(T(5,3) + T(5,5)) = 5*(960 + 720) = 8400. Example of integral formula (6) ... Integral_{t = -1..1} (1-t^2)*(16-120*t^2+120*t^4)*(272-3696*t^2+8400*t^4-5040*t^6) dt = 2830336/1365 = -2^13*Bernoulli(12). Examples of sign change statistic sc on snakes of type (0,0) = = = = = = = = = = = = = = = = = = = = = = .....Snakes....# sign changes sc.......t^sc = = = = = = = = = = = = = = = = = = = = = = n=1 ...0 1 -2 0...........1................t ...0 2 -1 0...........1................t yields R(1,t) = 2*t; n=2 ...0 1 -2 3 0.........2................t^2 ...0 1 -3 2 0.........2................t^2 ...0 2 1 3 0..........0................1 ...0 2 -1 3 0.........2................t^2 ...0 2 -3 1 0.........2................t^2 ...0 3 1 2 0..........0................1 ...0 3 -1 2 0.........2................t^2 ...0 3 -2 1 0.........2................t^2 yields R(2,t) = 2 + 6*t^2.
Links
- G. C. Greubel, Table of n, a(n) for the first 50 rows, flattened
- K. Boyadzhiev, Derivative Polynomials for tanh, tan, sech and sec in Explicit Form, arXiv:0903.0117 [math.CA], 2009-2010.
- M-P. Grosset and A. P. Veselov, Bernoulli numbers and solitons, arXiv:math/0503175 [math.GM], 2005.
- A. Hodges and C. V. Sukumar, Bernoulli, Euler, permutations and quantum algebras, Proc. R. Soc. A (2007) 463, 2401-2414 doi:10.1098/rspa.2007.0001
- Michael E. Hoffman, Derivative polynomials, Euler polynomials,and associated integer sequences, Electronic Journal of Combinatorics, Volume 6 (1999), Research Paper #R21.
- Michael E. Hoffman, Derivative polynomials for tangent and secant, Amer. Math. Monthly, 102 (1995), 23-30.
- M. Josuat-Verges, Enumeration of snakes and cycle-alternating permutations, arXiv:1011.0929 [math.CO], 2010.
- Shi-Mei Ma, Qi Fang, Toufik Mansour, Yeong-Nan Yeh, Alternating Eulerian polynomials and left peak polynomials, arXiv:2104.09374, 2021
Programs
-
Maple
R = proc(n) option remember; if n=0 then RETURN(1); else RETURN(expand(diff((u^2+1)*R(n-1), u))); fi; end proc; for n from 0 to 12 do t1 := series(R(n), u, 20); lprint(seriestolist(t1)); od:
-
Mathematica
Table[(-1)^(n + 1)*(-1)^((n - k)/2)*Sum[j!*StirlingS2[n + 1, j]*2^(n + 1 - j)*(-1)^(n + j - k)*Binomial[j - 1, k], {j, k + 1, n + 1}], {n, 0, 10}, {k, 0, n}] // Flatten (* G. C. Greubel, Jul 22 2017 *)
-
PARI
{T(n, k) = if( n<0 || k<0 || k>n, 0, if(n==k, n!, (k+1)*(T(n-1, k-1) + T(n-1, k+1))))};
-
PARI
{T(n, k) = my(A); if( n<0 || k>n, 0, A=1; for(i=1, n, A = ((1 + x^2) * A)'); polcoeff(A, k))}; /* Michael Somos, Jun 24 2017 */
Formula
GENERATING FUNCTION
E.g.f.:
(1)... F(t,z) = 1/(cos(z)-t*sin(z))^2 = Sum_{n>=0} R(n,t)*z^n/n! = 1 + (2*t)*z + (2+6*t^2)*z^2/2! + (16*t+24*t^3)*z^3/3! + ....
The e.g.f. equals the square of the e.g.f. of A104035.
Continued fraction representation for the o.g.f:
(2)... F(t,z) = 1/(1-2*t*z - 2*(1+t^2)*z^2/(1-4*t*z -...- n*(n+1)*(1+t^2)*z^2/(1-2*n*(n+1)*t*z -....
RECURRENCE RELATION
(3)... T(n,k) = (k+1)*(T(n-1,k-1) + T(n-1,k+1)).
ROW POLYNOMIALS
The polynomials R(n,t) satisfy the recurrence relation
(4)... R(n+1,t) = d/dt{(1+t^2)*R(n,t)} with R(0,t) = 1.
Let D be the derivative operator d/dt and U = t, the shift operator.
(5)... R(n,t) = (D + DUU)^n 1
RELATION WITH OTHER SEQUENCES
A) Derivative Polynomials A155100
The polynomials (1+t^2)*R(n,t) are the polynomials P_(n+2)(t) of A155100.
Put S(n,t) = R(n,i*t), where i = sqrt(-1). We have the definite integral evaluation
(6)... Integral_{t = -1..1} (1-t^2)*S(m,t)*S(n,t) dt = (-1)^((m-n)/2)*2^(m+n+3)*Bernoulli(m+n+2).
The case m = n is equivalent to the result of [Grosset and Veselov]. The methods used there extend to the general case.
C) Zigzag Numbers A000111
D) Eulerian Numbers A008292
The polynomials R(n,t) are related to the Eulerian polynomials A(n,t) via
(8)... R(n,t) = (t+i)^n*A(n+1,(t-i)/(t+i))
with the inverse identity
(9)... A(n+1,t) = (-i/2)^n*(1-t)^n*R(n,i*(1+t)/(1-t)),
where {A(n,t)}n>=1 = [1,1+t,1+4*t+t^2,1+11*t+11*t^2+t^3,...] is the sequence of Eulerian polynomials and i = sqrt(-1).
E) Ordered set partitions A019538
(10)... R(n,t) = (-2*i)^n*T(n+1,x)/x,
where x = i/2*t - 1/2 and T(n,x) is the n-th row po1ynomial of A019538;
F) Miscellaneous
Column 1 is the sequence of tangent numbers - see A000182.
A000670(n+1) = (-i/2)^n*R(n,3*i).
A004123(n+2) = 2*(-i/2)^n*R(n,5*i).
A080795(n+1) =(-1)^n*(sqrt(-2))^n*R(n,sqrt(-2)). - Peter Bala, Aug 26 2011
From Leonid Bedratyuk, Aug 12 2012: (Start)
T(n,k) = (-1)^(n+1)*(-1)^((n-k)/2)*Sum_{j=k+1..n+1} j! *stirling2(n+1,j) *2^(n+1-j) *(-1)^(n+j-k) *binomial(j-1,k), see A059419.
Sum_{j=i+1..n+1}((1-(-1)^(j-i))/(2*(j-i))*(-1)^((n-j)/2)*T(n,j))=(n+1)*(-1)^((n-1-i)/2)*T(n-1,i), for n>1 and 0
G.f.: 1/G(0,t,x), where G(k,t,x) = 1 - 2*t*x - 2*k*t*x - (1+t^2)*(k+2)*(k+1)*x^2/G(k+1,t,x); (continued fraction due to T. J. Stieltjes). - Sergei N. Gladkovskii, Dec 27 2013
A216966 O.g.f.: 1/(1 - x/(1 - 2^3*x/(1 - 3^3*x/(1 - 4^3*x/(1 - 5^3*x/(1 - 6^3*x/(1 -...))))))), a continued fraction.
1, 1, 9, 297, 24273, 3976209, 1145032281, 530050022073, 369626762653857, 369614778179835681, 509880429246329788329, 940535818601273787325257, 2261104378216803649437779313, 6933711495845384616312688513329, 26630255658298074277771723491847161
Offset: 0
Keywords
Comments
Compare to the continued fraction o.g.f. for the Euler numbers (A000364):
1/(1-x/(1-2^2*x/(1-3^2*x/(1-4^2*x/(1-5^2*x/(1-6^2*x/(1-...))))))).
From Vaclav Kotesovec, Sep 24 2020: (Start)
In general, if s>0 and g.f. = 1/(1 - x/(1 - 2^s*x/(1 - 3^s*x/(1 - 4^s*x/(1 - 5^s*x/(1 - 6^s*x/(1 -...))))))), a continued fraction, then
a(n,s) ~ c(s) * d(s)^n * (n!)^s / sqrt(n), where
d(s) = (2*s*Gamma(2/s) / Gamma(1/s)^2)^s
c(s) = sqrt(s*d(s)/(2*Pi)). (End)
Examples
G.f.: A(x) = 1 + x + 9*x^2 + 297*x^3 + 24273*x^4 + 3976209*x^5 +...
Programs
-
Maple
T := proc(n, k) option remember; if k = 0 then 1 else if k = n then T(n, k-1) else -(k - n - 1)^3 * T(n, k - 1) + T(n - 1, k) fi fi end: a := n -> T(n, n): seq(a(n), n = 0..14); # Peter Luschny, Oct 02 2023
-
Mathematica
nmax = 20; CoefficientList[Series[1/Fold[(1 - #2/#1) &, 1, Reverse[Range[nmax + 1]^3*x]], {x, 0, nmax}], x] (* Vaclav Kotesovec, Aug 25 2017 *)
-
PARI
{a(n)=local(CF=1+x*O(x^n)); for(k=1, n, CF=1/(1-(n-k+1)^3*x*CF)); polcoeff(CF,n)} for(n=0,20,print1(a(n),", "))
Formula
G.f.: T(0), where T(k) = 1 - x*(k+1)^3/(x*(k+1)^3 -1/T(k+1) ); (continued fraction). - Sergei N. Gladkovskii, Oct 12 2013
a(n) ~ c * d^n * (n!)^3 / sqrt(n), where d = 192 * sqrt(3) * Pi^3 / Gamma(1/3)^9 = 1.450930901627203932388423902788627... and c = 12 * sqrt(2) * 3^(1/4) * Pi / Gamma(1/3)^(9/2) = sqrt(3*d/(2*Pi)) = 0.8323271443586650769764930497... - Vaclav Kotesovec, Aug 25 2017, updated Sep 23 2020
A162443 Numerators of the BG1[ -5,n] coefficients of the BG1 matrix.
5, 66, 680, 2576, 33408, 14080, 545792, 481280, 29523968, 73465856, 27525120, 856162304, 1153433600, 18798870528, 86603988992, 2080374784, 2385854332928, 3216930504704, 71829033058304, 7593502179328, 281749854617600
Offset: 1
Comments
The BG1 matrix coefficients are defined by BG1[2m-1,1] = 2*beta(2m) and the recurrence relation BG1[2m-1,n] = BG1[2m-1,n-1] - BG1[2m-3,n-1]/(2*n-3)^2 with m = .. , -2, -1, 0, 1, 2, .. and n = 1, 2, 3, .. . As usual beta(m) = sum((-1)^k/(1+2*k)^m, k=0..infinity). For the BG2 matrix, the even counterpart of the BG1 matrix, see A008956.
We discovered that the n-th term of the row coefficients can be generated with BG1[1-2*m,n] = RBS1(1-2*m,n)* 4^(n-1)*((n-1)!)^2/ (2*n-2)! for m >= 1. For the BS1(1-2*m,n) polynomials see A160485.
The coefficients in the columns of the BG1 matrix, for m >= 1 and n >= 2, can be generated with GFB(z;n) = ((-1)^(n+1)*CFN2(z;n)*GFB(z;n=1) + BETA(z;n))/((2*n-3)!!)^2 for n >= 2. For the CFN2(z;n) and the Beta polynomials see A160480.
The BG1[ -5,n] sequence can be generated with the first Maple program and the BG1[2*m-1,n] matrix coefficients can be generated with the second Maple program.
The BG1 matrix is related to the BS1 matrix, see A160480 and the formulas below.
Examples
The first few formulas for the BG1[1-2*m,n] matrix coefficients are: BG1[ -1,n] = (1)*4^(n-1)*(n-1)!^2/(2*n-2)! BG1[ -3,n] = (1-2*n)*4^(n-1)*(n-1)!^2/(2*n-2)! BG1[ -5,n] = (1-8*n+12*n^2)*4^(n-1)*(n-1)!^2/(2*n-2)! The first few generating functions GFB(z;n) are: GFB(z;2) = ((-1)*(z^2-1)*GFB(z;1) + (-1))/1 GFB(z;3) = ((+1)*(z^4-10*z^2+9)*GFB(z;1) + (-11 + z^2))/9 GFB(z;4) = ((-1)*( z^6- 35*z^4+259*z^2-225)*GFB(z;1) + (-299 + 36*z^2 - z^4))/225
Links
- M. Abramowitz and I. A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards, Applied Math. Series 55, Tenth Printing, 1972, Chapter 23, pp. 811-812.
- J. M. Amigo, Relations among Sums of Reciprocal Powers Part II, International Journal of Mathematics and Mathematical Sciences , Volume 2008 (2008), pp. 1-20.
Crossrefs
Programs
-
Maple
a := proc(n): numer((1-8*n+12*n^2)*4^(n-1)*(n-1)!^2/(2*n-2)!) end proc: seq(a(n), n=1..21); # End program 1 nmax1 := 5; coln := 3; Digits := 20: mmax1 := nmax1: for n from 0 to nmax1 do t2(n, 0) := 1 od: for n from 0 to nmax1 do t2(n, n) := doublefactorial(2*n-1)^2 od: for n from 1 to nmax1 do for m from 1 to n-1 do t2(n, m) := (2*n-1)^2* t2(n-1, m-1) + t2(n-1, m) od: od: for m from 1 to mmax1 do BG1[1-2*m, 1] := euler(2*m-2) od: for m from 1 to mmax1 do BG1[2*m-1, 1] := Re(evalf(2*sum((-1)^k1/(1+2*k1)^(2*m), k1=0..infinity))) od: for m from -mmax1 +coln to mmax1 do BG1[2*m-1, coln] := (-1)^(coln+1)*sum((-1)^k1*t2(coln-1, k1)*BG1[2*m-(2*coln-1)+2*k1, 1], k1=0..coln-1)/doublefactorial(2*coln-3)^2 od; # End program 2 # Maple programs edited by Johannes W. Meijer, Sep 25 2012
Formula
a(n) = numer(BG1[ -5,n]) and A162444(n) = denom(BG1[ -5,n]) with BG1[ -5,n] = (1-8*n+12*n^2)*4^(n-1)*(n-1)!^2/(2*n-2)!.
The generating functions GFB(z;n) of the coefficients in the matrix columns are defined by
GFB(z;n) = sum(BG1[2*m-1,n]*z^(2*m-2), m=1..infinity).
GFB(z;n) = (1-z^2/(2*n-3)^2)*GFB(n-1) - 4^(n-2)*(n-2)!^2/((2*n-4)!*(2*n-3)^2) for n => 2 with GFB(z;n=1) = 1/(z*cos(Pi*z/2))*int(sin(z*t)/sin(t),t=0..Pi/2).
The column sums cs(n) = sum(BG1[2*m-1,n]*z^(2*m-2), m=1..infinity) = 4^(n-1)/((2*n-2)*binomial(2*n-2,n-1)) for n >= 2.
BG1[2*m-1,n] = (n-1)!^2*4^(n-1)*BS1[2*m-1,n]/(2*n-2)!
A000816 E.g.f.: Sum_{n >= 0} a(n) * x^(2*n) / (2*n)! = sin(x)^2 / cos(2*x).
0, 2, 40, 1952, 177280, 25866752, 5535262720, 1633165156352, 635421069967360, 315212388819402752, 194181169538675507200, 145435130631317935357952, 130145345400688287667978240, 137139396592145493713802493952
Offset: 0
Keywords
Links
- R. J. Mathar, Table of n, a(n) for n = 0..200
Programs
-
Mathematica
Union[ Range[0, 26]! CoefficientList[ Series[ Sin[x]^2/Cos[ 2x], {x, 0, 26}], x]] (* Robert G. Wilson v, Apr 16 2011 *) Table[(-1)^(n + 1) 2^(2 n) I PolyLog[-2 n, I], {n, 1, 13}] (* Artur Jasinski, Mar 21 2022 *) With[{nn=30},Take[CoefficientList[Series[Sin[x]^2/Cos[2x],{x,0,nn}],x] Range[0,nn]!,{1,-1,2}]] (* Harvey P. Dale, Oct 18 2024 *)
-
PARI
{a(n) = local(m); if( n<0, 0, m = 2*n; m! * polcoeff( 1 / (2 - 1 / cos(x + x * O(x^m))^2) - 1, m))} /* Michael Somos, Apr 16 2011 */
-
Sage
@CachedFunction def sp(n,x) : if n == 0 : return 1 return -add(2^(n-k)*sp(k,1/2)*binomial(n,k) for k in range(n)[::2]) def A000816(n) : return 0 if n == 0 else abs(sp(2*n,x)/2) [A000816(n) for n in (0..13)] # Peter Luschny, Jul 30 2012
Formula
(1/2) * A002436(n), n > 0. - Ralf Stephan, Mar 09 2004
a(n) = 2^(2*n - 1) * A000364(n) except at n=0.
E.g.f.: sin(x)^2/cos(2x) = 1/Q(0) - 1/2; Q(k) = 1 + 1/(1-2*(x^2)/(2*(x^2)-(k+1)*(2k+1)/Q(k+1))); (continued fraction). - Sergei N. Gladkovskii, Nov 18 2011
a(n) = A000819(n) unless n=0.
G.f.: (1/(G(0))-1)/2 where G(k) = 1 - 4*x*(k+1)^2/G(k+1); (continued fraction). - Sergei N. Gladkovskii, Jan 12 2013
G.f.: T(0)/2 - 1/2, where T(k) = 1 - 4*x*(k+1)^2/( 4*x*(k+1)^2 - 1/T(k+1) ); (continued fraction). - Sergei N. Gladkovskii, Oct 25 2013
E.g.f.: sin(x)^2/cos(2*x) = x^2/(1-2*x^2)*T(0), where T(k) = 1 - x^2*(2*k+1)*(2*k+2)/( x^2*(2*k+1)*(2*k+2) + ((k+1)*(2*k+1) - 2*x^2)*((k+2)*(2*k+3) - 2*x^2)/T(k+1) ); (continued fraction). - Sergei N. Gladkovskii, Oct 25 2013
From Artur Jasinski, Mar 21 2022: (Start)
For n > 0:
a(n) = Pi^(2*n-1)*(-Psi(2*n,1/4) - (4^n)*(2^(2*n+1)-1)*Gamma(2*n+1)*Zeta(2*n+1)).
a(n) = (-1)^(n+1)*2^(2*n)*i*Li_(2*n,i) where i=sqrt(-1) and Li is polylogarithm function.
a(n) = (-64)^n*(zeta(-2*n,1/4)-zeta(-2*n,3/4)) where zeta is Hurwitz zeta function.
a(n) = (-16)^n*lerchphi(-1,-2*n,1/2). (End)
A005647 Salié numbers.
1, 1, 3, 19, 217, 3961, 105963, 3908059, 190065457, 11785687921, 907546301523, 84965187064099, 9504085749177097, 1251854782837499881, 191781185418766714683, 33810804270120276636139, 6796689405759438360407137, 1545327493049348356667631841
Offset: 0
Comments
There is another sequence called Salié numbers, A000795. - Benedict W. J. Irwin, Feb 10 2016
References
- L. Comtet, Advanced Combinatorics, Reidel, 1974, p. 87, Problem 32.
- N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
Links
- T. D. Noe, Table of n, a(n) for n = 0..100
- P. Bala, A triangle for calculating A005647
- L. Carlitz, The coefficients of cosh x/ cos x, Monatshefte für Mathematik 69(2) (1965), 129-135.
Programs
-
Mathematica
nmax = 17; se = Series[ Cosh[x]/Cos[x], {x, 0, 2*nmax}]; a[n_] := Coefficient[se, x, 2*n]*(2*n)!/2^n; Table[a[n], {n, 0, nmax}](* Jean-François Alcover, May 11 2012 *) Join[{1},Table[SeriesCoefficient[Series[1/(1+ContinuedFractionK[Floor[(k^2+ 1)/2]*x*-1,1,{k,1,20}]),{x,0,20}],n],{n,1,20}]](* Benedict W. J. Irwin, Feb 10 2016 *)
Formula
a(n) = A000795(n)/2^n.
Expand cosh x / cos x and multiply coefficients by n!/(2^(n/2)).
a(n) = 2^(-n)*Sum_{k=0..n} A000364(k)*binomial(2*n, 2*k). - Philippe Deléham, Jul 30 2003
a(n) ~ (2*n)! * 2^(n+2) * cosh(Pi/2) / Pi^(2*n+1). - Vaclav Kotesovec, Mar 08 2014
G.f.: A(x) = 1/(1 - x/(1 - 2x/(1 - 5x/(1 - 8x/(1 - 13x/(1 - 18x/(1 -...))))))), a continued fraction where the coefficients are A000982 (ceiling(n^2/2)). - Benedict W. J. Irwin, Feb 10 2016
A024235 Expansion of e.g.f. tan(x)*sin(x)/2 (even powers only).
0, 1, 2, 31, 692, 25261, 1351382, 99680491, 9695756072, 1202439837721, 185185594118762, 34674437196568951, 7757267081778543452, 2043536254646561946181, 626129820701814932734142, 220771946624511552276841411, 88759695789769644718332394832
Offset: 0
Comments
From Peter Bala, Nov 10 2016: (Start)
This sequence gives the coefficients in an asymptotic expansion related to the constant Pi/8. Recall the Madhava-Gregory-Leibniz series Pi/4 = Sum_{k = 1..inf} (-1)^(k-1)/(2*k - 1). Borwein et al. gave an asymptotic expansion for the tails of this series: Pi/2 - 2*Sum_{k = 1..N/2} (-1)^(k-1)/(2*k - 1) ~ 1/N - 1/N^3 + 5/N^5 - 61/N^7 + ..., where N is an integer divisible by 4 and the sequence of unsigned coefficients [1, 1, 5, 61,...] is the sequence of Euler numbers A000364.
Similarly, we have the series representation Pi/8 = Sum_{k = 1..inf} (-1)^k/((2*k - 3)*(2*k - 1)*(2*k + 1)): using the approach of Borwein et al. we can show the associated asymptotic expansion for the tails of the series is Pi/4 - 2*Sum_{k = 1..N/2} (-1)^k/((2*k - 3)*(2*k - 1)*(2*k + 1)) ~ -1/N^3 + 2/N^5 - 31/N^7 + 692/N^9 - ..., where N is divisible by 4 and where the sequence of unsigned coefficients [1, 2, 31, 692,...] forms the present sequence. A numerical example is given below. Cf. A278080 and A278195. (End)
Examples
tan(x)*sin(x)/2 = 1/2*x^2 + 1/12*x^4 + 31/720*x^6 + 173/10080*x^8 + ... From _Peter Bala_, Nov 10 2016: (Start) Asymptotic expansion at N = 100000. The truncated series 2*Sum_{k = 1..N/2} (-1)^k/((2*k - 3)*(2*k - 1)*(2*k + 1)) = 0.78539816339744(9)309615660(6)4581987(603) 104929(1657)84377... to 50 digits. The bracketed digits show where this decimal expansion differs from that of Pi/4. The numbers -1, 2, -31, 692 must be added to the bracketed numbers to give the correct decimal expansion to 50 digits: Pi/4 = 0.78539816339744(8)309615660(8)4581987(572)104929(2349)84377.... (End)
Links
- Vincenzo Librandi, Table of n, a(n) for n = 0..50
- J. M. Borwein, P. B. Borwein, K. Dilcher, Pi, Euler numbers and asymptotic expansions, Amer. Math. Monthly, 96 (1989), 681-687.
- Eric Weisstein's World of Mathematics, Euler Polynomial.
Programs
-
Maple
A000364 := proc(n) abs(euler(2*n)); end proc: seq(1/2*(A000364(n) - (-1)^n), n = 0..20); # Peter Bala, Nov 10 2016
-
Mathematica
With[{nn=30},Take[CoefficientList[Series[Tan[x]*Sin[x]/2,{x,0,nn}], x]Range[0,nn]!,{1,-1,2}]] (* Harvey P. Dale, Apr 27 2012 *)
Formula
G.f.: 1/2*(G(0) - 1/(1+x)) where G(k) = 1 - x*(2*k+1)^2/(1 - x*(2*k+2)^2/G(k+1) ); (recursively defined continued fraction). - Sergei N. Gladkovskii, Feb 09 2013
a(n) ~ (2*n)! * (2/Pi)^(2*n+1). - Vaclav Kotesovec, Jan 23 2015
From Peter Bala, Nov 10 2016: (Start)
a(n) = 1/2*(A000364(n) - (-1)^n).
a(n) = 1/8*(-4)^n*( -E(2*n,3/2) + 2*E(2*n,1/2) - E(2*n,-1/2) ), where E(n,x) is the Euler polynomial of order n.
G.f. 1/2!*sin^2(x)/cos(x) = x^2/2! + 2*x^4/4! + 31*x^6/6! + 692*x^8/8! + ....
O.g.f. for a signed version of the sequence: Sum_{n >= 0} ( 1/2^n * Sum_{k = 0..n} (-1)^k*binomial(n, k)/((1 - (2*k - 1)*x)*(1 - (2*k + 1)*x)*(1 - (2*k + 3)*x)) ) = 1 - 2*x^2 + 31*x^4 - 692*x^6 + .... (End)
Extensions
Extended and signs tested Mar 15 1997.
More terms from Harvey P. Dale, Apr 27 2012
A081658 Triangle read by rows: T(n, k) = (-2)^k*binomial(n, k)*Euler(k, 1/2).
1, 1, 0, 1, 0, -1, 1, 0, -3, 0, 1, 0, -6, 0, 5, 1, 0, -10, 0, 25, 0, 1, 0, -15, 0, 75, 0, -61, 1, 0, -21, 0, 175, 0, -427, 0, 1, 0, -28, 0, 350, 0, -1708, 0, 1385, 1, 0, -36, 0, 630, 0, -5124, 0, 12465, 0, 1, 0, -45, 0, 1050, 0, -12810, 0, 62325, 0, -50521, 1, 0, -55, 0, 1650, 0, -28182, 0, 228525, 0, -555731, 0, 1, 0, -66, 0, 2475, 0
Offset: 0
Comments
These are the coefficients of the Swiss-Knife polynomials A153641. - Peter Luschny, Jul 21 2012
Nonzero diagonals of the triangle are of the form A000364(k)*binomial(n+2k,2k)*(-1)^k.
A363393 is the dual triangle ('dual' in the sense of Euler-tangent versus Euler-secant numbers). - Peter Luschny, Jun 05 2023
Examples
The triangle begins [0] 1; [1] 1, 0; [2] 1, 0, -1; [3] 1, 0, -3, 0; [4] 1, 0, -6, 0, 5; [5] 1, 0, -10, 0, 25, 0; [6] 1, 0, -15, 0, 75, 0, -61; [7] 1, 0, -21, 0, 175, 0, -427, 0; ... From _Peter Luschny_, Sep 17 2021: (Start) The triangle shows the coefficients of the following polynomials: [1] 1; [2] 1 - x^2; [3] 1 - 3*x^2; [4] 1 - 6*x^2 + 5*x^4; [5] 1 - 10*x^2 + 25*x^4; [6] 1 - 15*x^2 + 75*x^4 - 61*x^6; [7] 1 - 21*x^2 + 175*x^4 - 427*x^6; ... These polynomials are the permanents of the n X n matrices with all entries above the main antidiagonal set to 'x' and all entries below the main antidiagonal set to '-x'. The main antidiagonals consist only of ones. Substituting x <- 1 generates the Euler tangent numbers A155585. (Compare with A046739.) (End)
Programs
-
Maple
ogf := n -> euler(n) / (1 - x)^(n + 1): ser := n -> series(ogf(n), x, 16): T := (n, k) -> coeff(ser(k), x, n - k): for n from 0 to 9 do seq(T(n, k), k = 0..n) od; # Peter Luschny, Jun 05 2023 T := (n, k) -> (-2)^k*binomial(n, k)*euler(k, 1/2): seq(seq(T(n, k), k = 0..n), n = 0..9); # Peter Luschny, Apr 03 2024
-
Mathematica
sk[n_, x_] := Sum[Binomial[n, k]*EulerE[k]*x^(n - k), {k, 0, n}]; Table[CoefficientList[sk[n, x], x] // Reverse, {n, 0, 12}] // Flatten (* Jean-François Alcover, Jun 04 2019 *) Flatten@Table[Binomial[n, k] EulerE[k], {n, 0, 12}, {k, 0, n}] (* Oliver Seipel, Jan 14 2025 *)
-
Python
from functools import cache @cache def T(n: int, k: int) -> int: if k == 0: return 1 if k % 2 == 1: return 0 if k == n: return -sum(T(n, j) for j in range(0, n - 1, 2)) return (T(n - 1, k) * n) // (n - k) for n in range(10): print([T(n, k) for k in range(n + 1)]) # Peter Luschny, Jun 05 2023
-
Sage
R = PolynomialRing(ZZ, 'x') @CachedFunction def p(n, x) : if n == 0 : return 1 return add(p(k, 0)*binomial(n, k)*(x^(n-k)-(n+1)%2) for k in range(n)[::2]) def A081658_row(n) : return [R(p(n,x)).reverse()[i] for i in (0..n)] for n in (0..8) : print(A081658_row(n)) # Peter Luschny, Jul 20 2012
Formula
Coefficients of the polynomials in k in the binomial transform of the expansion of 2/(exp(kx)+exp(-kx)).
From Peter Luschny, Jul 20 2012: (Start)
p{n}(0) = Signed Euler secant numbers A122045.
p{n}(1) = Signed Euler tangent numbers A155585.
p{n}(2) has e.g.f. 2*exp(x)/(exp(-2*x)+1) A119880.
2^n*p{n}(1/2) = Signed Springer numbers A188458.
3^n*p{n}(1/3) has e.g.f. 2*exp(4*x)/(exp(6*x)+1)
4^n*p{n}(1/4) has e.g.f. 2*exp(5*x)/(exp(8*x)+1).
The GCD of the rows without the first column: A155457. (End)
From Peter Luschny, Jun 05 2023: (Start)
T(n, k) = [x^(n - k)] Euler(k) / (1 - x)^(k + 1).
For a recursion see the Python program.
Conjecture: If n is prime then n divides T(n, k) for 1 <= k <= n-1. (End)
Extensions
Typo in data corrected by Peter Luschny, Jul 20 2012
Error in data corrected and new name by Peter Luschny, Apr 03 2024
A181985 Generalized Euler numbers. Square array A(n,k), n >= 1, k >= 0, read by antidiagonals. A(n,k) = n-alternating permutations of length n*k.
1, 1, 1, 1, 1, 1, 1, 1, 5, 1, 1, 1, 19, 61, 1, 1, 1, 69, 1513, 1385, 1, 1, 1, 251, 33661, 315523, 50521, 1, 1, 1, 923, 750751, 60376809, 136085041, 2702765, 1, 1, 1, 3431, 17116009, 11593285251, 288294050521, 105261234643, 199360981, 1
Offset: 1
Comments
For an integer n > 0, a permutation s = s_1...s_k is an n-alternating permutation if it has the property that s_i < s_{i+1} if and only if n divides i.
The classical Euler numbers count 2-alternating permutations of length 2n.
Ludwig Seidel gave in 1877 an efficient algorithm to compute the coefficients of sec which carries immediately over to the computation of the generalized Euler numbers (see the Maple script).
Examples
n\k [0][1] [2] [3] [4] [5] [1] 1, 1, 1, 1, 1, 1 [2] 1, 1, 5, 61, 1385, 50521 [A000364] [3] 1, 1, 19, 1513, 315523, 136085041 [A002115] [4] 1, 1, 69, 33661, 60376809, 288294050521 [A211212] [5] 1, 1, 251, 750751, 11593285251, 613498040952501 [6] 1, 1, 923, 17116009, 2301250545971, 1364944703949044401 [A030662][A211213] [A181991] The (n,n)-diagonal is A181992.
Links
- Peter Luschny, An old operation on sequences: the Seidel transform.
- 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]
Programs
-
Maple
A181985_list := proc(n, len) local E, dim, i, k; dim := n*(len-1); E := array(0..dim, 0..dim); E[0, 0] := 1; for i from 1 to dim do if i mod n = 0 then E[i, 0] := 0 ; for k from i-1 by -1 to 0 do E[k, i-k] := E[k+1, i-k-1] + E[k, i-k-1] od; else E[0, i] := 0; for k from 1 by 1 to i do E[k, i-k] := E[k-1, i-k+1] + E[k-1, i-k] od; fi od; seq(E[0, n*k], k=0..len-1) end: for n from 1 to 6 do print(A181985_list(n, 6)) od;
-
Mathematica
nmax = 9; A181985[n_, len_] := Module[{e, dim = n*(len - 1)}, e[0, 0] = 1; For[i = 1, i <= dim, i++, If[Mod[i, n] == 0 , e[i, 0] = 0 ; For[k = i-1, k >= 0, k--, e[k, i-k] = e[k+1, i-k-1] + e[k, i-k-1] ], e[0, i] = 0; For[k = 1, k <= i, k++, e[k, i-k] = e[k-1, i-k+1] + e[k-1, i-k] ]; ]]; Table[e[0, n*k], { k, 0, len-1}]]; t = Table[A181985[n, nmax], {n, 1, nmax}]; a[n_, k_] := t[[n, k+1]]; Table[a[n-k, k], {n, 1, nmax}, {k, 0, n-1}] // Flatten (* Jean-François Alcover, Jun 27 2013, translated and adapted from Maple *)
-
Sage
def A181985(m, n): shapes = ([x*m for x in p] for p in Partitions(n)) return (-1)^n*sum((-1)^len(s)*factorial(len(s))*SetPartitions(sum(s), s).cardinality() for s in shapes) for m in (1..6): print([A181985(m, n) for n in (0..7)]) # Peter Luschny, Aug 10 2015
A211212 4-alternating permutations of length 4n.
1, 1, 69, 33661, 60376809, 288294050521, 3019098162602349, 60921822444067346581, 2159058013333667522020689, 125339574046311949415000577841, 11289082167259099068433198467575829, 1510335441937894173173702826484473600301
Offset: 0
Keywords
Comments
a(n) = A181985(4,n).
Links
- L. Carlitz, Permutations with prescribed pattern, Math. Nachr. 58 (1973), 31-53.
- Peter Luschny, An old operation on sequences: the Seidel transform
Programs
-
Maple
A211212 := proc(n) local E, dim, i, k; dim := 4*(n-1); E := array(0..dim, 0..dim); E[0, 0] := 1; for i from 1 to dim do if i mod 4 = 0 then E[i, 0] := 0 ; for k from i-1 by -1 to 0 do E[k, i-k] := E[k+1, i-k-1] + E[k, i-k-1] od; else E[0, i] := 0; for k from 1 by 1 to i do E[k, i-k] := E[k-1, i-k+1] + E[k-1, i-k] od; fi od; E[0, dim] end: seq(A211212(i), i = 1..12); A211212_list := proc(size) local E, S; E := 2*exp(x*z)/(cosh(z)+cos(z)); S := z -> series(E, z, 4*(size+1)); seq((-1)^n*(4*n)!*subs(x=0, coeff(S(z), z, 4*n)), n=0..size-1) end: A211212_list(12); # Peter Luschny, Jun 06 2016
-
Mathematica
A181985[n_, len_] := Module[{e, dim = n (len - 1)}, e[0, 0] = 1; For[i = 1, i <= dim, i++, If[Mod[i, n] == 0, e[i, 0] = 0; For[k = i - 1, k >= 0, k--, e[k, i - k] = e[k + 1, i - k - 1] + e[k, i - k - 1]], e[0, i] = 0; For[k = 1, k <= i, k++, e[k, i - k] = e[k - 1, i - k + 1] + e[k - 1, i - k]]]]; Table[e[0, n k], {k, 0, len - 1}]]; a[n_] := A181985[4, n + 1] // Last; Table[a[n], {n, 0, 11}] (* Jean-François Alcover, Jun 29 2019 *)
-
Sage
# uses[A from A181936] A211212 = lambda n: A(4,4*n)*(-1)^n print([A211212(n) for n in (0..11)]) # Peter Luschny, Jan 24 2017
Formula
a(0) = 1; a(n) = Sum_{k=1..n} (-1)^(k+1) * binomial(4*n,4*k) * a(n-k). - Ilya Gutkovskiy, Jan 27 2020
E.g.f.: 1/(cos(x/sqrt(2))*cosh(x/sqrt(2))) = 1 + 1*z^4/4! + 69*z^8/8! + 33661*z^12/12! + ... - Michael Wallner, Nov 17 2020
a(n) ~ 2^(10*n + 9/2) * n^(4*n + 1/2) / (cosh(Pi/2) * Pi^(4*n + 1/2) * exp(4*n)). - Vaclav Kotesovec, Nov 17 2020
A227887 O.g.f.: 1/(1 - x/(1 - 2^4*x/(1 - 3^4*x/(1 - 4^4*x/(1 - 5^4*x/(1 - 6^4*x/(1 -...))))))), a continued fraction.
1, 1, 17, 1585, 485729, 372281761, 601378506737, 1820943071778385, 9489456505643743169, 79759396929125826861121, 1027412704023984825792488657, 19464301715272748317827942755185, 524230105465412991467916306841439009, 19509134827116013764271741468197795034081
Offset: 0
Keywords
Comments
Compare to the continued fraction for the Euler numbers (A000364):
1/(1-x/(1-2^2*x/(1-3^2*x/(1-4^2*x/(1-5^2*x/(1-6^2*x/(1-...))))))).
From Vaclav Kotesovec, Sep 24 2020: (Start)
In general, if s>0 and g.f. = 1/(1 - x/(1 - 2^s*x/(1 - 3^s*x/(1 - 4^s*x/(1 - 5^s*x/(1 - 6^s*x/(1 -...))))))), a continued fraction, then
a(n,s) ~ c(s) * d(s)^n * (n!)^s / sqrt(n), where
d(s) = (2*s*Gamma(2/s) / Gamma(1/s)^2)^s
c(s) = sqrt(s*d(s)/(2*Pi)). (End)
Examples
G.f.: A(x) = 1 + x + 17*x^2 + 1585*x^3 + 485729*x^4 + 372281761*x^5 +...
Programs
-
Maple
T := proc(n, k) option remember; if k = 0 then 1 else if k = n then T(n, k-1) else (k - n - 1)^4 * T(n, k - 1) + T(n - 1, k) fi fi end: a := n -> T(n, n): seq(a(n), n = 0..13); # Peter Luschny, Oct 02 2023
-
Mathematica
nmax = 20; CoefficientList[Series[1/Fold[(1 - #2/#1) &, 1, Reverse[Range[nmax + 1]^4*x]], {x, 0, nmax}], x] (* Vaclav Kotesovec, Aug 25 2017 *)
-
PARI
{a(n)=local(CF=1+x*O(x^n)); for(k=1, n, CF=1/(1-(n-k+1)^4*x*CF)); polcoeff(CF, n)} for(n=0, 20, print1(a(n), ", "))
Formula
a(n) ~ c * d^n * (n!)^4 / sqrt(n), where d = 4096 * Pi^2 / Gamma(1/4)^8 = 1.353976395034780345656335026823167975194... and c = sqrt(2*d/Pi) = 64 * sqrt(2*Pi) / Gamma(1/4)^4 = 0.9284223954634658948993105287957575... - Vaclav Kotesovec, Aug 25 2017, updated Sep 23 2020
Comments