cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-10 of 18 results. Next

A000364 Euler (or secant or "Zig") numbers: e.g.f. (even powers only) sec(x) = 1/cos(x).

Original entry on oeis.org

1, 1, 5, 61, 1385, 50521, 2702765, 199360981, 19391512145, 2404879675441, 370371188237525, 69348874393137901, 15514534163557086905, 4087072509293123892361, 1252259641403629865468285, 441543893249023104553682821, 177519391579539289436664789665
Offset: 0

Views

Author

Keywords

Comments

Inverse Gudermannian gd^(-1)(x) = log(sec(x) + tan(x)) = log(tan(Pi/4 + x/2)) = arctanh(sin(x)) = 2 * arctanh(tan(x/2)) = 2 * arctanh(csc(x) - cot(x)). - Michael Somos, Mar 19 2011
a(n) is the number of downup permutations of [2n]. Example: a(2)=5 counts 4231, 4132, 3241, 3142, 2143. - David Callan, Nov 21 2011
a(n) is the number of increasing full binary trees on vertices {0,1,2,...,2n} for which the leftmost leaf is labeled 2n. - David Callan, Nov 21 2011
a(n) is the number of unordered increasing trees of size 2n+1 with only even degrees allowed and degree-weight generating function given by cosh(t). - Markus Kuba, Sep 13 2014
a(n) is the number of standard Young tableaux of skew shape (n+1,n,n-1,...,3,2)/(n-1,n-2,...2,1). - Ran Pan, Apr 10 2015
Since cos(z) has a root at z = Pi/2 and no other root in C with a smaller |z|, the radius of convergence of the e.g.f. (intended complex-valued) is Pi/2 = A019669 (see also A028296). - Stanislav Sykora, Oct 07 2016
All terms are odd. - Alois P. Heinz, Jul 22 2018
The sequence starting with a(1) is periodic modulo any odd prime p. The minimal period is (p-1)/2 if p == 1 mod 4 and p-1 if p == 3 mod 4 [Knuth & Buckholtz, 1967, Theorem 2]. - Allen Stenger, Aug 03 2020
Conjecture: taking the sequence [a(n) : n >= 1] modulo an integer k gives a purely periodic sequence with period dividing phi(k). For example, the sequence taken modulo 21 begins [1, 5, 19, 20, 16, 2, 1, 5, 19, 20, 16, 2, 1, 5, 19, 20, 16, 2, 1, 5, 19, ...] with an apparent period of 6 = phi(21)/2. - Peter Bala, May 08 2023

Examples

			G.f. = 1 + x + 5*x^2 + 61*x^3 + 1385*x^4 + 50521*x^5 + 2702765*x^6 + 199360981*x^7 + ...
sec(x) = 1 + 1/2*x^2 + 5/24*x^4 + 61/720*x^6 + ...
From _Gary W. Adamson_, Jul 18 2011: (Start)
The first few rows of matrix M are:
   1,  1,  0,  0,  0, ...
   4,  4,  4,  0,  0, ...
   9,  9,  9,  9,  0, ...
  16, 16, 16, 16, 16, ... (End)
		

References

  • M. Abramowitz and I. A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards Applied Math. Series 55, 1964 (and various reprintings), p. 810; gives a version with signs: E_{2n} = (-1)^n*a(n) (this is A028296).
  • Miklos Bona, editor, Handbook of Enumerative Combinatorics, CRC Press, 2015, page 932.
  • J. M. Borwein and D. M. Bailey, Mathematics by Experiment, Peters, Boston, 2004; p. 49
  • J. M. Borwein, D. H. Bailey, and R. Girgensohn, Experimentation in Mathematics, A K Peters, Ltd., Natick, MA, 2004. x+357 pp. See p. 141.
  • Florian Cajori, A History of Mathematical Notations, Dover edition (2012), par. 420.
  • G. Chrystal, Algebra, Vol. II, p. 342.
  • L. Comtet, Advanced Combinatorics, Reidel, 1974, p. 49.
  • John H. Conway and Richard K. Guy, The Book of Numbers, New York: Springer-Verlag, 1996. See p. 110.
  • H. Doerrie, 100 Great Problems of Elementary Mathematics, Dover, NY, 1965, p. 69.
  • L. Euler, Inst. Calc. Diff., Section 224.
  • S. Mukai, An Introduction to Invariants and Moduli, Cambridge, 2003; see p. 444.
  • L. 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.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • Jerome Spanier and Keith B. Oldham, "Atlas of Functions", Hemisphere Publishing Corp., 1987, chapters 5 and 33, pages 41, 314.
  • J. V. Uspensky and M. A. Heaslet, Elementary Number Theory, McGraw-Hill, NY, 1939, p. 269.

Crossrefs

Essentially same as A028296 and A122045.
First column of triangle A060074.
Two main diagonals of triangle A060058 (as iterated sums of squares).
Absolute values of row sums of A160485. - Johannes W. Meijer, Jul 06 2009
Left edge of triangle A210108, see also A125053, A076552. Cf. A255881.
Bisection (even part) of A317139.
The sequences [(-k^2)^n*Euler(2*n, 1/k), n = 0, 1, ...] are: A000007 (k=1), A000364 (k=2), |A210657| (k=3), A000281 (k=4), A272158 (k=5), A002438 (k=6), A273031 (k=7).

Programs

  • Maple
    series(sec(x),x,40): SERIESTOSERIESMULT(%): subs(x=sqrt(y),%): seriestolist(%);
    # end of program
    A000364_list := proc(n) local S,k,j; S[0] := 1;
    for k from 1 to n do S[k] := k*S[k-1] od;
    for k from  1 to n do
        for j from k to n do
            S[j] := (j-k)*S[j-1]+(j-k+1)*S[j] od od;
    seq(S[j], j=1..n)  end:
    A000364_list(16);  # Peter Luschny, Apr 02 2012
    A000364 := proc(n)
        abs(euler(2*n)) ;
    end proc: # R. J. Mathar, Mar 14 2013
  • Mathematica
    Take[ Range[0, 32]! * CoefficientList[ Series[ Sec[x], {x, 0, 32}], x], {1, 32, 2}] (* Robert G. Wilson v, Apr 23 2006 *)
    Table[Abs[EulerE[2n]], {n, 0, 30}] (* Ray Chandler, Mar 20 2007 *)
    a[ n_] := If[ n < 0, 0, With[{m = 2 n}, m! SeriesCoefficient[ Sec[ x], {x, 0, m}]]]; (* Michael Somos, Nov 22 2013 *)
    a[ n_] := If[ n < 0, 0, With[{m = 2 n + 1}, m! SeriesCoefficient[ InverseGudermannian[ x], {x, 0, m}]]]; (* Michael Somos, Nov 22 2013 *)
    a[n_] := Sum[Sum[Binomial[k, m] (-1)^(n+k)/(2^(m-1)) Sum[Binomial[m, j]* (2j-m)^(2n), {j, 0, m/2}] (-1)^(k-m), {m, 0, k}], {k, 1, 2n}]; Table[ a[n], {n, 0, 16}] (* Jean-François Alcover, Jun 26 2019, after Vladimir Kruchinin *)
    a[0] := 1; a[n_] := a[n] = -Sum[a[n - k]/(2 k)!, {k, 1, n}]; Map[(-1)^# (2 #)! a[#] &, Range[0, 16]] (* Oliver Seipel, May 18 2024 *)
  • Maxima
    a(n):=sum(sum(binomial(k,m)*(-1)^(n+k)/(2^(m-1))*sum(binomial(m,j)*(2*j-m)^(2*n),j,0,m/2)*(-1)^(k-m),m,0,k),k,1,2*n); /* Vladimir Kruchinin, Aug 05 2010 */
    
  • Maxima
    a[n]:=if n=0 then 1 else sum(sum((i-k)^(2*n)*binomial(2*k, i)*(-1)^(i+k+n), i, 0, k-1)/ (2^(k-1)), k, 1, 2*n); makelist(a[n], n, 0, 16); /* Vladimir Kruchinin, Oct 05 2012 */
    
  • PARI
    {a(n)=local(CF=1+x*O(x^n));if(n<0,return(0), for(k=1,n,CF=1/(1-(n-k+1)^2*x*CF));return(Vec(CF)[n+1]))} \\ Paul D. Hanna Oct 07 2005
    
  • PARI
    {a(n) = if( n<0, 0, (2*n)! * polcoeff( 1 / cos(x + O(x^(2*n + 1))), 2*n))}; /* Michael Somos, Jun 18 2002 */
    
  • PARI
    {a(n) = my(A); if( n<0, 0, n = 2*n+1 ; A = x * O(x^n); n! * polcoeff( log(1 / cos(x + A) + tan(x + A)), n))}; /* Michael Somos, Aug 15 2007 */
    
  • PARI
    {a(n)=polcoeff(sum(m=0, n, (2*m)!/2^m * x^m/prod(k=1, m, 1+k^2*x+x*O(x^n))), n)} \\ Paul D. Hanna, Sep 20 2012
    
  • PARI
    list(n)=my(v=Vec(1/cos(x+O(x^(2*n+1)))));vector(n,i,v[2*i-1]*(2*i-2)!) \\ Charles R Greathouse IV, Oct 16 2012
    
  • PARI
    a(n)=subst(bernpol(2*n+1),'x,1/4)*4^(2*n+1)*(-1)^(n+1)/(2*n+1) \\ Charles R Greathouse IV, Dec 10 2014
    
  • PARI
    a(n)=abs(eulerfrac(2*n)) \\ Charles R Greathouse IV, Mar 23 2022
    
  • PARI
    \\ Based on an algorithm of Peter Bala, cf. link in A110501.
    upto(n) = my(v1, v2, v3); v1 = vector(n+1, i, 0); v1[1] = 1; v2 = vector(n, i, i^2); v3 = v1; for(i=2, n+1, for(j=2, i-1, v1[j] += v2[i-j+1]*v1[j-1]); v1[i] = v1[i-1]; v3[i] = v1[i]); v3 \\ Mikhail Kurkov, Aug 30 2025
    
  • Python
    from functools import lru_cache
    from math import comb
    @lru_cache(maxsize=None)
    def A000364(n): return 1 if n == 0 else (1 if n % 2 else -1)*sum((-1 if i % 2 else 1)*A000364(i)*comb(2*n,2*i) for i in range(n)) # Chai Wah Wu, Jan 14 2022
    
  • Python
    # after Mikhail Kurkov, based on an algorithm of Peter Bala, cf. link in A110501.
    def euler_list(len: int) -> list[int]:
        if len == 0: return []
        v1 = [1] + [0] * (len - 1)
        v2 = [i**2 for i in range(1, len + 1)]
        result = [0] * len
        result[0] = 1
        for i in range(1, len):
            for j in range(1, i):
                v1[j] += v2[i - j] * v1[j - 1]
            v1[i] = v1[i - 1]
            result[i] = v1[i]
        return result
    print(euler_list(1000))  # Peter Luschny, Aug 30 2025
  • Sage
    # Algorithm of L. Seidel (1877)
    # n -> [a(0), a(1), ..., a(n-1)] for n > 0.
    def A000364_list(len) :
        R = []; A = {-1:0, 0:1}; k = 0; e = 1
        for i in (0..2*len-1) :
            Am = 0; A[k + e] = 0; e = -e
            for j in (0..i) : Am += A[k]; A[k] = Am; k += e
            if e < 0 : R.append(A[-i//2])
        return R
    A000364_list(17) # Peter Luschny, Mar 31 2012
    

Formula

E.g.f.: Sum_{n >= 0} a(n) * x^(2*n) / (2*n)! = sec(x). - Michael Somos, Aug 15 2007
E.g.f.: Sum_{n >= 0} a(n) * x^(2*n+1) / (2*n+1)! = gd^(-1)(x). - Michael Somos, Aug 15 2007
E.g.f.: Sum_{n >= 0} a(n)*x^(2*n+1)/(2*n+1)! = 2*arctanh(cosec(x)-cotan(x)). - Ralf Stephan, Dec 16 2004
Pi/4 - [Sum_{k=0..n-1} (-1)^k/(2*k+1)] ~ (1/2)*[Sum_{k>=0} (-1)^k*E(k)/(2*n)^(2k+1)] for positive even n. [Borwein, Borwein, and Dilcher]
Also, for positive odd n, log(2) - Sum_{k = 1..(n-1)/2} (-1)^(k-1)/k ~ (-1)^((n-1)/2) * Sum_{k >= 0} (-1)^k*E(k)/n^(2*k+1), where E(k) is the k-th Euler number, by Borwein, Borwein, and Dilcher, Lemma 2 with f(x) := 1/(x + 1/2), h := 1/2 and then replace x with (n-1)/2. - Peter Bala, Oct 29 2016
Let M_n be the n X n matrix M_n(i, j) = binomial(2*i, 2*(j-1)) = A086645(i, j-1); then for n>0, a(n) = det(M_n); example: det([1, 1, 0, 0; 1, 6, 1, 0; 1, 15, 15, 1; 1, 28, 70, 28 ]) = 1385. - Philippe Deléham, Sep 04 2005
This sequence is also (-1)^n*EulerE(2*n) or abs(EulerE(2*n)). - Paul Abbott (paul(AT)physics.uwa.edu.au), Apr 14 2006
a(n) = 2^n * E_n(1/2), where E_n(x) is an Euler polynomial.
a(k) = a(j) (mod 2^n) if and only if k == j (mod 2^n) (k and j are even). [Stern; see also Wagstaff and Sun]
E_k(3^(k+1)+1)/4 = (3^k/2)*Sum_{j=0..2^n-1} (-1)^(j-1)*(2j+1)^k*[(3j+1)/2^n] (mod 2^n) where k is even and [x] is the greatest integer function. [Sun]
a(n) ~ 2^(2*n+2)*(2*n)!/Pi^(2*n+1) as n -> infinity. [corrected by Vaclav Kotesovec, Jul 10 2021]
a(n) = Sum_{k=0..n} A094665(n, k)*2^(n-k). - Philippe Deléham, Jun 10 2004
Recurrence: a(n) = -(-1)^n*Sum_{i=0..n-1} (-1)^i*a(i)*binomial(2*n, 2*i). - Ralf Stephan, Feb 24 2005
O.g.f.: 1/(1-x/(1-4*x/(1-9*x/(1-16*x/(...-n^2*x/(1-...)))))) (continued fraction due to T. J. Stieltjes). - Paul D. Hanna, Oct 07 2005
a(n) = (Integral_{t=0..Pi} log(tan(t/2)^2)^(2n)dt)/Pi^(2n+1). - Logan Kleinwaks (kleinwaks(AT)alumni.princeton.edu), Mar 15 2007
From Peter Bala, Mar 24 2009: (Start)
Basic hypergeometric generating function: 2*exp(-t)*Sum {n >= 0} Product_{k = 1..n} (1-exp(-(4*k-2)*t))*exp(-2*n*t)/Product_{k = 1..n+1} (1+exp(-(4*k-2)*t)) = 1 + t + 5*t^2/2! + 61*t^3/3! + .... For other sequences with generating functions of a similar type see A000464, A002105, A002439, A079144 and A158690.
a(n) = 2*(-1)^n*L(-2*n), where L(s) is the Dirichlet L-function L(s) = 1 - 1/3^s + 1/5^s - + .... (End)
Sum_{n>=0} a(n)*z^(2*n)/(4*n)!! = Beta(1/2-z/(2*Pi),1/2+z/(2*Pi))/Beta(1/2,1/2) with Beta(z,w) the Beta function. - Johannes W. Meijer, Jul 06 2009
a(n) = Sum_(Sum_(binomial(k,m)*(-1)^(n+k)/(2^(m-1))*Sum_(binomial(m,j)*(2*j-m)^(2*n),j,0,m/2)*(-1)^(k-m),m,0,k),k,1,2*n), n>0. - Vladimir Kruchinin, Aug 05 2010
If n is prime, then a(n)==1 (mod 2*n). - Vladimir Shevelev, Sep 04 2010
From Peter Bala, Jan 21 2011: (Start)
(1)... a(n) = (-1/4)^n*B(2*n,-1),
where {B(n,x)}n>=1 = [1, 1+x, 1+6*x+x^2, 1+23*x+23*x^2+x^3, ...] is the sequence of Eulerian polynomials of type B - see A060187. Equivalently,
(2)... a(n) = Sum_{k = 0..2*n} Sum_{j = 0..k} (-1)^(n-j) *binomial(2*n+1,k-j)*(j+1/2)^(2*n).
We also have
(3)... a(n) = 2*A(2*n,i)/(1+i)^(2*n+1),
where i = sqrt(-1) and where {A(n,x)}n>=1 = [x, x + x^2, x + 4*x^2 + x^3, ...] denotes the sequence of Eulerian polynomials - see A008292. Equivalently,
(4)... a(n) = i*Sum_{k = 1..2*n} (-1)^(n+k)*k!*Stirling2(2*n,k) *((1+i)/2)^(k-1)
= i*Sum_{k = 1..2*n} (-1)^(n+k)*((1+i)/2)^(k-1) Sum_{j = 0..k} (-1)^(k-j)*binomial(k,j)*j^(2*n).
Either this explicit formula for a(n) or (2) above may be used to obtain congruence results for a(n). For example, for prime p
(5a)... a(p) = 1 (mod p)
(5b)... a(2*p) = 5 (mod p)
and for odd prime p
(6a)... a((p+1)/2) = (-1)^((p-1)/2) (mod p)
(6b)... a((p-1)/2) = -1 + (-1)^((p-1)/2) (mod p).
(End)
a(n) = (-1)^n*2^(4*n+1)*(zeta(-2*n,1/4) - zeta(-2*n,3/4)). - Gerry Martens, May 27 2011
a(n) may be expressed as a sum of multinomials taken over all compositions of 2*n into even parts (Vella 2008): a(n) = Sum_{compositions 2*i_1 + ... + 2*i_k = 2*n} (-1)^(n+k)* multinomial(2*n, 2*i_1, ..., 2*i_k). For example, there are 4 compositions of the number 6 into even parts, namely 6, 4+2, 2+4 and 2+2+2, and hence a(3) = 6!/6! - 6!/(4!*2!) - 6!/(2!*4!) + 6!/(2!*2!*2!) = 61. A companion formula expressing a(n) as a sum of multinomials taken over the compositions of 2*n-1 into odd parts has been given by Malenfant 2011. - Peter Bala, Jul 07 2011
a(n) = the upper left term in M^n, where M is an infinite square production matrix; M[i,j] = A000290(i) = i^2, i >= 1 and 1 <= j <= i+1, and M[i,j] = 0, i >= 1 and j >= i+2 (see examples). - Gary W. Adamson, Jul 18 2011
E.g.f. A'(x) satisfies the differential equation A'(x)=cos(A(x)). - Vladimir Kruchinin, Nov 03 2011
From Peter Bala, Nov 28 2011: (Start)
a(n) = D^(2*n)(cosh(x)) evaluated at x = 0, where D is the operator cosh(x)*d/dx. a(n) = D^(2*n-1)(f(x)) evaluated at x = 0, where f(x) = 1+x+x^2/2! and D is the operator f(x)*d/dx.
Other generating functions: cosh(Integral_{t = 0..x} 1/cos(t)) dt = 1 + x^2/2! + 5*x^4/4! + 61*x^6/6! + 1385*x^8/8! + .... Cf. A012131.
A(x) := arcsinh(tan(x)) = log( sec(x) + tan(x) ) = x + x^3/3! + 5*x^5/5! + 61*x^7/7! + 1385*x^9/9! + .... A(x) satisfies A'(x) = cosh(A(x)).
B(x) := Series reversion( log(sec(x) + tan(x)) ) = x - x^3/3! + 5*x^5/5! - 61*x^7/7! + 1385*x^9/9! - ... = arctan(sinh(x)). B(x) satisfies B'(x) = cos(B(x)). (End)
HANKEL transform is A097476. PSUM transform is A173226. - Michael Somos, May 12 2012
a(n+1) - a(n) = A006212(2*n). - Michael Somos, May 12 2012
a(0) = 1 and, for n > 0, a(n) = (-1)^n*((4*n+1)/(2*n+1) - Sum_{k = 1..n} (4^(2*k)/2*k)*binomial(2*n,2*k-1)*A000367(k)/A002445(k)); see the Bucur et al. link. - L. Edson Jeffery, Sep 17 2012
O.g.f.: Sum_{n>=0} (2*n)!/2^n * x^n / Product_{k=1..n} (1 + k^2*x). - Paul D. Hanna, Sep 20 2012
From Sergei N. Gladkovskii, Oct 31 2011 to Oct 11 2013: (Start)
Continued fractions:
E.g.f.: (sec(x)) = 1+x^2/T(0), T(k) = 2(k+1)(2k+1) - x^2 + x^2*(2k+1)(2k+2)/T(k+1).
E.g.f.: 2/Q(0) where Q(k) = 1 + 1/(1 - x^2/(x^2 - 2*(k+1)*(2*k+1)/Q(k+1))).
G.f.: 1/Q(0) where Q(k) = 1 + x*k*(3*k-1) - x*(k+1)*(2*k+1)*(x*k^2+1)/Q(k+1).
E.g.f.: (2 + x^2 + 2*U(0))/(2 + (2 - x^2)*U(0)) where U(k)= 4*k + 4 + 1/( 1 + x^2/(2 - x^2 + (2*k+3)*(2*k+4)/U(k+1))).
E.g.f.: 1/cos(x) = 8*(x^2+1)/(4*x^2 + 8 - x^4*U(0)) where U(k) = 1 + 4*(k+1)*(k+2)/(2*k+3 - x^2*(2*k+3)/(x^2 - 8*(k+1)*(k+2)*(k+3)/U(k+1))).
G.f.: 1/U(0) where U(k) = 1 + x - x*(2*k+1)*(2*k+2)/(1 - x*(2*k+1)*(2*k+2)/U(k+1)).
G.f.: 1 + x/G(0) where G(k) = 1 + x - x*(2*k+2)*(2*k+3)/(1 - x*(2*k+2)*(2*k+3)/G(k+1)).
Let F(x) = sec(x^(1/2)) = Sum_{n>=0} a(n)*x^n/(2*n)!, then F(x)=2/(Q(0) + 1) where Q(k)= 1 - x/(2*k+1)/(2*k+2)/(1 - 1/(1 + 1/Q(k+1))).
G.f.: Q(0), where Q(k) = 1 - x*(k+1)^2/( x*(k+1)^2 - 1/Q(k+1)).
E.g.f.: 1/cos(x) = 1 + x^2/(2-x^2)*Q(0), where Q(k) = 1 - 2*x^2*(k+1)*(2*k+1)/( 2*x^2*(k+1)*(2*k+1)+ (12-x^2 + 14*k + 4*k^2)*(2-x^2 + 6*k + 4*k^2)/Q(k+1)). (End)
a(n) = Sum_{k=1..2*n} (Sum_{i=0..k-1} (i-k)^(2*n)*binomial(2*k,i)*(-1)^(i+k+n)) / 2^(k-1) for n>0, a(0)=1. - Vladimir Kruchinin, Oct 05 2012
It appears that a(n) = 3*A076552(n -1) + 2*(-1)^n for n >= 1. Conjectural congruences: a(2*n) == 5 (mod 60) for n >= 1 and a(2*n+1) == 1 (mod 60) for n >= 0. - Peter Bala, Jul 26 2013
From Peter Bala, Mar 09 2015: (Start)
O.g.f.: Sum_{n >= 0} 1/2^n * Sum_{k = 0..n} (-1)^k*binomial(n,k)/(1 - sqrt(-x)*(2*k + 1)) = Sum_{n >= 0} 1/2^n * Sum_{k = 0..n} (-1)^k*binomial(n,k)/(1 + x*(2*k + 1)^2).
O.g.f. is 1 + x*d/dx(log(F(x))), where F(x) = 1 + x + 3*x^2 + 23*x^3 + 371*x^4 + ... is the o.g.f. for A255881. (End)
Sum_(n >= 1, A034947(n)/n^(2d+1)) = a(d)*Pi^(2d+1)/(2^(2d+2)-2)(2d)! for d >= 0; see Allouche and Sondow, 2015. - Jonathan Sondow, Mar 21 2015
Asymptotic expansion: 4*(4*n/(Pi*e))^(2*n+1/2)*exp(1/2+1/(24*n)-1/(2880*n^3) +1/(40320*n^5)-...). (See the Luschny link.) - Peter Luschny, Jul 14 2015
a(n) = 2*(-1)^n*Im(Li_{-2n}(i)), where Li_n(x) is polylogarithm, i=sqrt(-1). - Vladimir Reshetnikov, Oct 22 2015
Limit_{n->infinity} ((2*n)!/a(n))^(1/(2*n)) = Pi/2. - Stanislav Sykora, Oct 07 2016
O.g.f.: 1/(1 + x - 2*x/(1 - 2*x/(1 + x - 12*x/(1 - 12*x/(1 + x - 30*x/(1 - 30*x/(1 + x - ... - (2*n - 1)*(2*n)*x/(1 - (2*n - 1)*(2*n)*x/(1 + x - ... ))))))))). - Peter Bala, Nov 09 2017
For n>0, a(n) = (-PolyGamma(2*n, 1/4) / 2^(2*n - 1) - (2^(2*n + 2) - 2) * Gamma(2*n + 1) * zeta(2*n + 1)) / Pi^(2*n + 1). - Vaclav Kotesovec, May 04 2020
a(n) ~ 2^(4*n + 3) * n^(2*n + 1/2) / (Pi^(2*n + 1/2) * exp(2*n)) * exp(Sum_{k>=1} bernoulli(k+1) / (k*(k+1)*2^k*n^k)). - Vaclav Kotesovec, Mar 05 2021
Peter Bala's conjectured congruences, a(2n) == 5 (mod 60) for n >= 1 and a(2n + 1) == 1 (mod 60), hold due to the results of Stern (mod 4) and Knuth & Buckholtz (mod 3 and 5). - Charles R Greathouse IV, Mar 23 2022

Extensions

Typo in name corrected by Anders Claesson, Dec 01 2015

A060187 Triangle read by rows: Eulerian numbers of type B, T(n,k) (1 <= k <= n) given by T(n, 1) = T(n,n) = 1, otherwise T(n, k) = (2*n - 2*k + 1)*T(n-1, k-1) + (2*k - 1)*T(n-1, k).

Original entry on oeis.org

1, 1, 1, 1, 6, 1, 1, 23, 23, 1, 1, 76, 230, 76, 1, 1, 237, 1682, 1682, 237, 1, 1, 722, 10543, 23548, 10543, 722, 1, 1, 2179, 60657, 259723, 259723, 60657, 2179, 1, 1, 6552, 331612, 2485288, 4675014, 2485288, 331612, 6552, 1, 1, 19673, 1756340, 21707972, 69413294, 69413294, 21707972, 1756340, 19673, 1
Offset: 1

Views

Author

N. J. A. Sloane, Mar 20 2001

Keywords

Comments

Rows are expansions of p(x,n) = 2^n*(1 - x)^(1 + n)*LerchPhi(x, -n, 1/2). Row sums are A000165. - Roger L. Bagula, Sep 16 2008
Eulerian numbers of type B. The n-th row of this triangle is the h-vector of the simplicial complex dual to a permutohedron of type B_(n-1). For example, the permutohedron of type B_2 is an octagon whose dual, also an octagon, has f-polynomial f(x) = 1 + 8*x + 8*x^2 and h-polynomial given by (x-1)^2 + 8*(x-1) + 8 = 1 + 6*x + x^2, giving [1,6,1] as row 3 of this table (see Fomin and Reading, p. 21). The corresponding triangle of f-vectors for the type B permutohedra is A145901. The Hilbert transform of the current array is A145905. - Peter Bala, Oct 26 2008
From Peter Bala, Oct 13 2011: (Start)
The row polynomials count the elements of the hyperoctahedral group B_n (the group of signed permutations on n letters) according to the number of type B descents (see Chow and Gessel).
Let P denote Pascal's triangle. Then the first column of the array P*(I-t*P^2)^(-1) (I the identity array) begins [1/(1-t),(1+t)/(1-t)^2,(1+6*t+t^2)/(1-t)^3,...]. The numerator polynomials are the row polynomials of this table. Similarly, in the array (I-t*A062715)^-1, the numerator polynomials in the first column produce the row polynomials of this table (but with an extra factor of t). Cf. A145901. (End)
The Dasse-Hartaut and Hitczenko paper (section 6.1.4) shows this triangle of numbers, when suitably normalized, satisfies the central limit theorem. - Peter Bala, Mar 05 2012
These are the coefficients of the midpoint Eulerian polynomials (see Quade/Collatz and Schoenberg). In terms of the cardinal B-splines b_n(t) these polynomials can be defined as M_n(x) = 2^n*n!*Sum_{k=0..n} b_{n+1}(k+1/2)*x^k. - Peter Luschny, Apr 26 2013
The o.g.f. Godd(n, x) = Sum_{m>=0} Sodd(n, m)*x^m, with Sodd(n, m) = Sum_{j=0..m} (1+2*j)^n is Podd(n, x)/(1 - x)^(n+2) with Podd(n, x) = Sum_{k=0..n} T(n+1, k+1)*x^k. E.g., Godd(2, x) = (1 + 6*x + x^2)/(1 - x)^4; see A000447(n+1) for n >= 0. For the e.g.f.s see A282628. - Wolfdieter Lang, Mar 17 2017
Let h_0(x,y) = x*y/(x+y), and D = x*D_x - y*D_y where D_x is the partial derivative w.r.t. x, etc. Put h_{n+1}(x,y) = D(h_n)(x,y). Then h_n(x,y) = x*y/(x+y)^(n+1)*f_{n}(x,y) where f_n(x,y) = Sum_{k=0..n} (-1)^k*T(n+1,k+1)*y^(n-k)*x^k. If instead of h_0, one similarly uses g_0(x,y) = x*y/(y-x), etc., then one obtains g_n(x,y) = x*y/(y-x)^(n+1)*Sum_{k=0..n} T(n+1,k+1)*y^(n-k)*x^k. (If instead of D one considers D' = x*D_x + y*D_y, then h_0 and g_0 are fixed points of D'.) - Gregory Gerard Wojnar, Oct 28 2018
Counts coloop-free Schubert delta-matroids by cornered rank, see Remark 4.6 of the paper by Eur, Fink, Larson, Spink. - Matt Larson, May 20 2024

Examples

			The triangle T(n, k) begins:
n\k 1    2     3      4      5     6    7 8 ...
1:  1
2:  1    1
3:  1    6     1
4:  1   23    23      1
5:  1   76   230     76      1
6:  1  237  1682   1682    237     1
7:  1  722 10543  23548  10543   722    1
8:  1 2179 60657 259723 259723 60657 2179 1
...
row n = 9: 1 6552 331612 2485288 4675014 2485288 331612 6552 1,
row n = 10: 1 19673 1756340 21707972 69413294 69413294 21707972 1756340 19673 1,
row n = 11: 1 59038 9116141 178300904 906923282 1527092468 906923282 178300904 9116141 59038 1, ... reformatted. - _Wolfdieter Lang_, Mar 17 2017
		

References

  • G. Boros and V. H. Moll, Irresistible Integrals: Symbolics, Analysis and Experiments in the Evaluation of Integrals, Cambridge University Press, 2004.
  • T. K. Petersen, Eulerian Numbers, Birkhauser, 2015, Chapter 11.
  • W. Quade and L. Collatz, Zur Interpolationstheorie der reellen periodischen Funktionen. Sitzungsbericht der Preuss. Akad. der Wiss., Phys.-Math. Kl, (1938), 383-429.

Crossrefs

Diagonals give A060188, A060189, A060190. Cf. A008292.
Cf. also A000165 (row sums), A002436 (alt. row sums), A008292, A145901, A145905 (Hilbert transform). A062715.

Programs

  • GAP
    a:=Flat(List([1..11],n->List([1..n],k->Sum([1..k],i->(-1)^(k-i)*Binomial(n,k-i)*(2*i-1)^(n-1))))); # Muniru A Asiru, Feb 09 2018
    
  • Magma
    [[(&+[(-1)^(k-j)*Binomial(n,k-j)*(2*j-1)^(n-1): j in [1..k]]): k in [1..n]]: n in [1..10]]; // G. C. Greubel, Nov 08 2018
    
  • Maple
    A060187:= (n,k) -> add((-1)^(k-i)*binomial(n,k-i)*(2*i-1)^(n-1), i = 1..k):
    for n from 1 to 10 do seq(A060187(n,k),k = 1..n); end do; # Peter Bala, Oct 26 2008
    T:=proc(n,k,l) option remember; if (n=1 or k=1 or k=n) then 1 else
    (l*n-l*k+1)*T(n-1,k-1,l)+(l*k-l+1)*T(n-1,k,l); fi; end;
    for n from 1 to 10 do lprint([seq(T(n,k,2),k=1..n)]); od; # N. J. A. Sloane, May 08 2013
    P := proc(n,x) option remember; if n = 0 then 1 else
      (n*x+(1/2)*(1-x))*P(n-1,x)+x*(1-x)*diff(P(n-1,x),x);
      expand(%) fi end:
    A060187 := (n,k) -> 2^n*coeff(P(n,x),x,k):
    seq(print(seq(A060187(n,k), k=0..n)), n=0..10);  # Peter Luschny, Mar 08 2014
  • Mathematica
    p[x_, n_] = 2^n (1 - x)^(1 + n) LerchPhi[x, -n, 1/2]; Table[CoefficientList[p[x, n], x], {n, 0, 10}] // Flatten (* Roger L. Bagula, Sep 16 2008 *)
    T[n_, k_] := Sum[(-1)^(k-i)*Binomial[n, k-i]*(2*i-1)^(n-1), {i, 1, k}]; Table[T[n, k], {n, 1, 10}, {k, 1, n}] // Flatten (* Jean-François Alcover, Nov 23 2015, after Peter Bala *)
  • PARI
    {T(n, k) = if( nMichael Somos, Jan 07 2011 */
    
  • Python
    from math import isqrt, comb
    def A060187(n):
        a = (m:=isqrt(k:=n<<1))+(k>m*(m+1))
        b = n-comb(a,2)
        return sum(-comb(a,b-i)*((i<<1)-1)**(a-1) if b-i&1 else comb(a,b-i)*((i<<1)-1)**(a-1) for i in range(1,b+1)) # Chai Wah Wu, Nov 13 2024
  • Sage
    @CachedFunction
    def A060187(n, k) :
        if n == 0: return 1 if k == 0 else 0
        return (2*(n-k)+1)*A060187(n-1, k-1) + (2*k+1)*A060187(n-1, k)
    for n in (0..8): [A060187(n,k) for k in (0..n)] # Peter Luschny, Apr 26 2013
    

Formula

T(s, 2) = 3^(s-1) - s. Sum_{t=1..s} T(s, t) = 2^(s-1)*(s-1)!.
From Peter Bala, Oct 26 2008: (Start)
T(n,k) = Sum_{i = 1..k} (-1)^(k-i)*binomial(n,k-i)*(2*i-1)^(n-1).
E.g.f.: (1 - x)*exp((1 - x)*t)/(1 - x*exp(2*(1 - x)*t)) = 1 + (1 + x)*t + (1 + 6*x + x^2)*t^2/2! + ... .
The row polynomials R(n,x) satisfy R(n,x)/(1 - x)^n = Sum_{i >= 1} (2*i - 1)^(n-1)*x^i. For example, row 3 gives (x + 6*x^2 + x^3)/ (1 - x)^3 = x + 3^2*x^2 + 5 ^2*x^3 + 7^2*x^4 + ... .
The recurrence relation R(n+1,x) = [(2*n+1)*x - 1]*R(n,x) + 2*x*(1 - x)*R'(n,x) shows that the row polynomials R(n,x) have only real zeros (apply Corollary 1.2 of [Liu and Wang]).
Worpitzky-type identity: Sum_{k = 1..n} T(n,k)*binomial(x+k-1,n-1) = (2*x+1)^(n-1).
The nonzero alternating row sums are (-1)^(n-1)*A002436(n). (End)
exp(x)*(d/dx)^n [exp(x)/(1 - exp(2*x))] = R(n+1,exp(2*x))/ (1 - exp(2*x))^(n+1).
Compare with Example 12.3.1. in [Boros and Moll]. - Peter Bala, Nov 07 2008
The n-th row polynomial R(n,x) = Sum_{k = 0..n} A145901(n,k)*x^k*(1 - x)^(n-k) = Sum_{k = 0..n} A145901(n,k)*(x - 1)^(n-k). - Peter Bala, Jul 22 2014
Assuming an offset 0, the n-th row polynomial = (x - 1)^n * log(x) * Integral_{u = 0..inf} (2*floor(u) + 1)^n * x^(-u) du, provided x > 1. - Peter Bala, Feb 06 2015
The finite sums of consecutive odd integer powers is derived from this number triangle: Sum_{k=1..n}(2k-1)^m = Sum_{j=1..m+1}binomial(n+m+1-j,m+1)*T(m+1,j). - Tony Foster III, Feb 09 2018

A000831 Expansion of e.g.f. (1 + tan(x))/(1 - tan(x)).

Original entry on oeis.org

1, 2, 4, 16, 80, 512, 3904, 34816, 354560, 4063232, 51733504, 724566016, 11070525440, 183240753152, 3266330312704, 62382319599616, 1270842139934720, 27507470234550272, 630424777638805504, 15250953398036463616, 388362339077351014400, 10384044045105304174592
Offset: 0

Views

Author

Keywords

Examples

			(1+tan x)/(1-tan x) = 1 + 2*x/1! + 4*x^2/2! + 16*x^3/3! + 80*x^4/4! + 512*x^5/5! + ...
		

Crossrefs

Programs

  • Magma
    m:=30; R:=PowerSeriesRing(Rationals(), m);
    Coefficients(R!(Laplace( (1+Tan(x))/(1-Tan(x)) ))); // G. C. Greubel, Mar 21 2019; Apr 28 2023
  • Maple
    A000831 := (1+tan(x))/(1-tan(x)) : for n from 0 to 200 do printf("%d %d ",n,n!*coeftayl(A000831,x=0,n)) ; end: # R. J. Mathar, Nov 19 2006
    A000831 := n -> `if`(n=0,1,(-1)^((n^2-n)/2)*4^n*(euler(n,1/2)+euler( n,1))): # Peter Luschny, Nov 24 2010
    # third Maple program:
    b:= proc(u, o) option remember;
          `if`(u+o=0, 1, 2*add(b(o-1+j, u-j), j=1..u))
        end:
    a:= n-> b(n, 0):
    seq(a(n), n=0..25);  # Alois P. Heinz, Sep 02 2020
  • Mathematica
    Range[0, 18]! CoefficientList[Series[(1+Tan[x])/(1-Tan[x]), {x,0,18}], x] (* Robert G. Wilson v, Apr 16 2011 *)
    b[u_, o_] := b[u, o] = If[u+o == 0, 1, 2*Sum[b[o-1+j, u-j], {j, 1, u}]];
    a[n_] := b[n, 0];
    Table[a[n], {n, 0, 25}] (* Jean-François Alcover, Dec 02 2023, after Alois P. Heinz *)
  • Maxima
    a(n):=sum(if evenp(n+k) then ((-1)^((n+k)/2)*sum(j!*stirling2(n,j)*2^(n-j+1)*(-1)^(j)*binomial(j-1,k-1),j,k,n)) else 0,k,1,n); /* Vladimir Kruchinin, Aug 19 2010 */
    
  • PARI
    a(n) = if( n<1, n==0, n! * polcoeff( 1 + 2 / ( 1 / tan( x + x * O(x^n)) - 1), n)) /* Michael Somos, Apr 16 2011 */
    
  • PARI
    a(n) = local(A); if( n<0, 0, A = x * O(x^n); n! * polcoeff( (cos(x + A) + sin(x + A)) / (cos(x + A) - sin(x + A)), n)) /* 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])
    A000831 = lambda n : abs(sp(n,x))
    [A000831(n) for n in (0..21)]     # Peter Luschny, Jul 30 2012
    
  • SageMath
    def A000831_list(prec):
        P. = PowerSeriesRing(QQ, prec)
        return P( (1+tan(x))/(1-tan(x)) ).egf_to_ogf().list()
    A000831_list(40) # G. C. Greubel, Mar 21 2019; Apr 28 2023
    

Formula

E.g.f.: tan(x+Pi/4).
a(n) = Sum_{k=1..n} (if even(n+k) ( (-1)^((n+k)/2)*Sum_{j=k..n} (j!*stirling2(n,j)*2^(n-j+1)*(-1)^(j)*binomial(j-1,k-1) ), n>0. - Vladimir Kruchinin, Aug 19 2010
a(n) = 4^n*(E_{n}(1/2) + E_{n}(1))*(-1)^((n^2-n)/2) for n > 0, where E_{n}(x) is an Euler polynomial. - Peter Luschny, Nov 24 2010
a(n) = 2^n * A000111(n). - Gerard P. Michon, Feb 24 2011
From Sergei N. Gladkovskii, Dec 01 2011 - Jan 24 2014: (Start)
Continued fractions:
E.g.f.: -1 + 2/(1-x*G(0)); G(k) = 1 - (x^2)/((x^2) - (2*k + 1)*(2*k + 3)/G(k+1)).
E.g.f.: 1 + 2*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 + 2*x/(G(0)-x) where G(k) = 2*k+1 - x^2/G(k+1).
G.f.: 1 + 2*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)).
E.g.f.: tan(2*x) + sec(2*x) = (x-1)/(x+1) - 2*(2*x^2+3)/( T(0)*3*x*(1+x)- 2*x^2-3)/(x+1), where T(k) = 1 - x^4*(4*k-1)*(4*k+7)/( x^4*(4*k-1)*(4*k+7) - (4*k+1)*(4*k+5)*(16*k^2 + 8*k - 2*x^2 - 3)*(16*k^2 + 40*k - 2*x^2 + 21)/T(k+1)).
E.g.f.: 1 + 2*x/Q(0), where Q(k) = 4*k+1 -x/(1 - x/( 4*k+3 + x/(1 + x/Q(k+1)))).
E.g.f.: tan(2*x) + sec(2*x) = 2*R(0)-1, where R(k) = 1 + x/( 4*k+1 - x/(1 - x/( 4*k+3 + x/R(k+1)))).
G.f.: 1+ G(0)*2*x/(1-2*x), where G(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))/G(k+1)). (End)
a(n) ~ n! * (4/Pi)^(n+1). - Vaclav Kotesovec, Jun 15 2015
a(0) = 1; a(n) = 2 * Sum_{k=0..n-1} binomial(n-2,k) * a(k) * a(n-k-1). - Ilya Gutkovskiy, Jun 11 2020

A003707 Expansion of e.g.f. log(1 + tan(x)).

Original entry on oeis.org

0, 1, -1, 4, -14, 80, -496, 3904, -34544, 354560, -4055296, 51733504, -724212224, 11070525440, -183218384896, 3266330312704, -62380415842304, 1270842139934720, -27507260369207296, 630424777638805504, -15250924309151350784, 388362339077351014400, -10384039093607251050496
Offset: 0

Views

Author

Keywords

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Bisections are A002436 and |A024299|.

Programs

  • Magma
    R:=PowerSeriesRing(Rationals(), 25); [0] cat Coefficients(R!(Laplace( Log(1 + Tan(x)) ))); // G. C. Greubel, Jun 08 2020
    
  • Maple
    seq(coeff(series( log(1 +tan(x)), x, n+1)*n!, x, n), n = 0..25); # G. C. Greubel, Jun 08 2020
  • Mathematica
    With[{nn = 30}, CoefficientList[Series[Log[1 + Tan[x]], {x, 0, nn}], x] Range[0, nn]!] (* Vincenzo Librandi, Apr 11 2014 *)
  • Maxima
    a(n):=sum((-1)^(k+1)*if evenp(n+k) then (-1)^((n+k)/2)/k*sum(j!*stirling2(n,j)*2^(n-j)*(-1)^(n+j-k)*binomial(j-1,k-1),j,k,n) else 0,k,1,n);  /* Vladimir Kruchinin, Aug 18 2010 */ /* Corrected by Petros Hadjicostas, Jun 05 2020 */
    
  • Maxima
    a(n):=sum(sum(binomial(j+n-2*m-1,n-2*m-1)*(j+n-2*m)!*2^(2*m-j)*(-1)^(n-m+j-1)*stirling2(n,j+n-2*m),j,0,2*m)/(n-2*m),m,0,(n-1)/2); /* Vladimir Kruchinin, Jan 21 2012 */
    
  • PARI
    my(x='x+O('x^66)); concat([0],Vec(serlaplace(log(1+tan(x))))) \\ Joerg Arndt, Sep 02 2013
    
  • Sage
    def A003707_list(prec):
        P. = PowerSeriesRing(QQ, prec)
        return P( log(1 +tan(x)) ).egf_to_ogf().list()
    A003707_list(25) # G. C. Greubel, Jun 08 2020

Formula

a(n) = Sum_{k=1..n} (-1)^(k+1) * evenp(n+k) * (-1)^((n+k)/2)/k * Sum_{j=k..n} j! * Stirling2(n, j) * 2^(n-j) * (-1)^(n+j-k) * binomial(j-1,k-1). [Vladimir Kruchinin, Aug 18 2010] [Corrected by Petros Hadjicostas, Jun 05 2020]
a(n) = Sum_{m=0..(n-1)/2} Sum_{j=0..2*m} binomial(j+n-2*m-1, n-2*m-1) * (j+n-2*m)! * 2^(2*m-j) * (-1)^(n-m+j-1) * Stirling2(n, j+n-2*m)/(n-2*m). [Vladimir Kruchinin, Jan 21 2012]
a(n) ~ (-1)^(n+1) * 4^n * (n-1)! / Pi^n. - Vaclav Kotesovec, Feb 16 2015

Extensions

Name corrected, more terms, Joerg Arndt, Sep 02 2013

A000816 E.g.f.: Sum_{n >= 0} a(n) * x^(2*n) / (2*n)! = sin(x)^2 / cos(2*x).

Original entry on oeis.org

0, 2, 40, 1952, 177280, 25866752, 5535262720, 1633165156352, 635421069967360, 315212388819402752, 194181169538675507200, 145435130631317935357952, 130145345400688287667978240, 137139396592145493713802493952
Offset: 0

Views

Author

Keywords

Crossrefs

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)

A326483 a(n) = 2^n*E2_{n}(1/2) with E2_{n} the polynomials defined in A326480.

Original entry on oeis.org

1, -2, -4, 40, 80, -1952, -3904, 177280, 354560, -25866752, -51733504, 5535262720, 11070525440, -1633165156352, -3266330312704, 635421069967360, 1270842139934720, -315212388819402752, -630424777638805504, 194181169538675507200
Offset: 0

Views

Author

Peter Luschny, Jul 12 2019

Keywords

Comments

For comments see A326480.

Crossrefs

Bisections (up to signs): A002436 (even), A000816 (odd).

Programs

  • Maple
    # The function E2(n) is defined in A326480.
    seq(subs(x=1/2, 2^n*E2(n)), n=0..22);

Formula

From Emanuele Munarini, Aug 22 2022: (Start)
E.g.f. for the sequence of the absolute values: (1+tan(2*t))/cos(2*t).
|a(2*n)| = 2^(2*n) |E(2*n)|.
|a(2*n+1)| = 2^(2*n+1) Sum_{k=0..n} binomial(2*n+1,2*k) |E(2*k)| T(n-k+1), where the E(n) are the Euler numbers (A122045) and the T(n) are the tangent numbers (A000182). (End)

A117436 Triangle related to exp(x)*sec(2*x).

Original entry on oeis.org

1, 0, 1, 4, 0, 1, 0, 12, 0, 1, 80, 0, 24, 0, 1, 0, 400, 0, 40, 0, 1, 3904, 0, 1200, 0, 60, 0, 1, 0, 27328, 0, 2800, 0, 84, 0, 1, 354560, 0, 109312, 0, 5600, 0, 112, 0, 1, 0, 3191040, 0, 327936, 0, 10080, 0, 144, 0, 1, 51733504, 0, 15955200, 0, 819840, 0, 16800, 0, 180, 0, 1
Offset: 0

Views

Author

Paul Barry, Mar 16 2006

Keywords

Comments

Inverse is A117435.
Conjecture: The d-th diagonal (starting with d=0) is proportional to the sequence of generalized binomial coefficients binomial(-x, d) where x is the column index. - Søren G. Have, Feb 26 2017

Examples

			Triangle begins as:
         1;
         0,       1;
         4,       0,        1;
         0,      12,        0,      1;
        80,       0,       24,      0,      1;
         0,     400,        0,     40,      0,     1;
      3904,       0,     1200,      0,     60,     0,     1;
         0,   27328,        0,   2800,      0,    84,     0,   1;
    354560,       0,   109312,      0,   5600,     0,   112,   0,   1;
         0, 3191040,        0, 327936,      0, 10080,     0, 144,   0, 1;
  51733504,       0, 15955200,      0, 819840,     0, 16800,   0, 180, 0, 1;
		

Crossrefs

Cf. A000364, A002436 (1st column), A117435 (inverse), A117437 (row sums).

Programs

  • Mathematica
    T[n_, k_]:= Binomial[n, k]*(2*I)^(n-k)*EulerE[n-k];
    Table[T[n, k], {n,0,12}, {k,0,n}]//Flatten (* G. C. Greubel, Jun 01 2021 *)
  • Sage
    flatten([[binomial(n,k)*(2*i)^(n-k)*euler_number(n-k) for k in (0..n)] for n in (0..12)]) # G. C. Greubel, Jun 01 2021

Formula

Number triangle whose k-th column has e.g.f. (x^k/k!)*sec(2*x).
T(n, 0) = A002436(n).
Sum_{k=0..n} T(n, k) = A117437(n).
T(n, k) = binomial(n,k) * (2*i)^(n-k) * E(n-k), where E(n) are the Euler numbers with E(2*n) = A000364(n) and E(2*n+1) = 0. - G. C. Greubel, Jun 01 2021

A173226 Partial sums of A000364.

Original entry on oeis.org

1, 2, 7, 68, 1453, 51974, 2754739, 202115720, 19593627865, 2424473303306, 372795661540831, 69721670054678732, 15584255833611765637, 4102656765126735657998, 1256362298168756601126283, 442800255547191861154809104, 177962191835086481297819598769
Offset: 0

Views

Author

Jonathan Vos Post, Feb 13 2010

Keywords

Comments

Partial sums of Euler numbers. Partial sums of secant or "Zig" numbers. The subsequence of prime partial sum of Euler numbers begins 2, 7, 1453, no more through a(17). What is the next such prime?

Crossrefs

Programs

  • Mathematica
    Accumulate[Table[Abs[EulerE[2n]],{n,0,20}]] (* Harvey P. Dale, Aug 10 2024 *)
  • Python
    from sympy import euler
    def A173226(n): return sum(abs(euler(i)) for i in range(0,(n<<1)+1,2)) # Chai Wah Wu, Apr 16 2023

Formula

a(n) = Sum_{i=0..n} A000364(i).
G.f.: 1/U(0)/(1-x) where U(k)=1 + x - x*(2*k+1)*(2*k+2)/(1 - x*(2*k+1)*(2*k+2)/U(k+1)) ; (continued fraction, 2-step). - Sergei N. Gladkovskii, Oct 15 2012
G.f.: 1/(1-x)/Q(0), where Q(k)= 1 - x*(2*k+1)^2/(1 - x*(2*k+2)^2/Q(k+1)); (continued fraction). - Sergei N. Gladkovskii, Apr 27 2013
G.f.: Q(0)/(1-x), where Q(k) = 1 - x*(k+1)^2/( x*(k+1)^2 - 1/Q(k+1) ); (continued fraction). - Sergei N. Gladkovskii, Oct 22 2013

A363398 Triangle read by rows. T(n, k) = [x^k] P(n, x), where P(n, x) = Sum_{k=0..n} 2^(n - k) * Sum_{j=0..k} (x^j * binomial(k, j) * (2*j + 1)^n), (secant case).

Original entry on oeis.org

1, 3, 3, 7, 36, 25, 15, 297, 625, 343, 31, 2106, 10000, 14406, 6561, 63, 13851, 131250, 369754, 413343, 161051, 127, 87480, 1546875, 7529536, 15411789, 14172488, 4826809, 255, 540189, 17109375, 134237509, 444816117, 721025327, 564736653, 170859375
Offset: 0

Views

Author

Peter Luschny, May 31 2023

Keywords

Comments

Here we give an inclusion-exclusion representation of 2^n*Euler(n) (see A122045 and A002436), in A363399 we give such a representation for 2^n*Euler(n, 1) = A155585(n), and in A363400 one for the combined sequences.

Examples

			The triangle T(n, k) starts:
  [0]   1;
  [1]   3,      3;
  [2]   7,     36,       25;
  [3]  15,    297,      625,       343;
  [4]  31,   2106,    10000,     14406,      6561;
  [5]  63,  13851,   131250,    369754,    413343,    161051;
  [6] 127,  87480,  1546875,   7529536,  15411789,  14172488,   4826809;
  [7] 255, 540189, 17109375, 134237509, 444816117, 721025327, 564736653, 170859375;
		

Crossrefs

Cf. A122045 (alternating row sums), A363396 (row sums), A126646 (column 0), A085527 (main diagonal), A141475 (central terms).
Cf. A363399 (tangent case), A363400 (combined case).

Programs

  • Maple
    P := (n, x) -> add(add(x^j*binomial(k, j)*(2*j + 1)^n, j=0..k)*2^(n-k), k=0..n):
    T := (n, k) -> coeff(P(n, x), x, k): seq(seq(T(n, k), k = 0..n), n = 0..7);
  • Mathematica
    (* From Detlef Meya, Oct 04 2023: (Start) *)
    T[n_, k_] := (2*k+1)^n*(2^(n+1) - Sum[Binomial[n+1, j], {j,0,k}]);
    (* Or: *)
    T[n_, k_] := (2*k+1)^n*Binomial[n+1, k+1]*Hypergeometric2F1[1, k-n, k+2, -1];
    Flatten[Table[T[n, k], {n, 0, 7}, {k, 0, n}]]  (* End *)

Formula

Sum_{k=0..n} (-1)^k*T(n, k) = 2^n*Euler(n) = 4^n*Euler(n, 1/2).
(Sum_{k=0..n} (-1)^k*T(n, k)) / 2^n = Euler(n) = 2^n*Euler(n, 1/2) = A122045(n).
Sum_{k=0..2*n} (-1)^k*T(2*n, k) = 4^n*Euler(2*n) = 16^n*Euler(2*n, 1/2) = (-1)^n*A002436(n).
From Detlef Meya, Oct 04 2023: (Start)
T(n, k) = (2*k + 1)^n * binomial(n+1, k+1) * hypergeom([1, k-n], [k+2], -1).
T(n, k) = (2*k + 1)^n * (2^(n + 1) - Sum_{j=0..k} binomial(n+1, j)). (End)

A363400 Triangle read by rows. T(n, k) = [x^k] P(n, x), where P(n, x) = Sum_{k=0..n} 2^(n - k) * Sum_{j=0..k} (x^j * binomial(k, j) * ((2 - (n mod 2)) * j + 1)^n).

Original entry on oeis.org

1, 3, 2, 7, 36, 25, 15, 88, 135, 64, 31, 2106, 10000, 14406, 6561, 63, 1824, 10206, 22528, 21875, 7776, 127, 87480, 1546875, 7529536, 15411789, 14172488, 4826809, 255, 31616, 478953, 2670592, 7265625, 10357632, 7411887, 2097152
Offset: 0

Views

Author

Peter Luschny, May 31 2023

Keywords

Comments

In A363398 we give an inclusion-exclusion representation for 2^n*Euler(n), and in A363399 we give such a representation of 2^n*Euler(n, 1) = A155585(n). Here the two representations are combined into one of A000111.

Examples

			Triangle T(n, k) starts:
[0]   1;
[1]   3,     2;
[2]   7,    36,      25;
[3]  15,    88,     135,      64;
[4]  31,  2106,   10000,   14406,     6561;
[5]  63,  1824,   10206,   22528,    21875,     7776;
[6] 127, 87480, 1546875, 7529536, 15411789, 14172488, 4826809;
[7] 255, 31616,  478953, 2670592,  7265625, 10357632, 7411887, 2097152;
		

Crossrefs

Cf. A126646 (column 0), A363401 (row sums), A000111, A059222, A002436.
Cf. A363398 (secant case), A363399 (tangent case).

Programs

  • Maple
    P := (n, x) -> add(add(x^j * binomial(k, j) * ((2 - irem(n, 2)) * j + 1)^n,
    j = 0..k) * 2^(n - k), k = 0..n): T := (n, k) -> coeff(P(n, x), x, k):
    seq(seq(T(n, k), k = 0..n), n = 0..8);
  • Mathematica
    From Detlef Meya, Oct 04 2023: (Start)
    T[n_, k_] := (2^(n+1)-Binomial[n+1, n-k+1]*Hypergeometric2F1[1, -k, n-k+2, -1])*(2*k+1-k*Mod[n, 2])^n;
    (* Or: *)
    T[n_, k_] := (2*k+1-k*Mod[n, 2])^(n-1)*Sum[Binomial[n+1, j], {j, 0, n-k}]*(2*k+1-k*Mod[n, 2]);
    Flatten[Table[T[n, k], {n, 0, 7}, {k, 0, n}]]  (* End *)

Formula

T(n, k) = A363399(n, k) for 0 <= k <= n if n is odd otherwise A363398(n, k).
(Sum_{k=0..n} (-1)^k * T(n, k)) / h(n) = A000111(n), where h(n) = (-1)^binomial(n, 2) * 2^(n * iseven(n)), see A059222.
From Detlef Meya, Oct 04 2023: (Start)
T(n, k) = (2*k + 1 - k*(n mod 2))^(n - 1)*add(binomial(n + 1, j), j = 0..n - k)*(2*k + 1 - k*(n mod 2)).
T(n, k) = (2^(n + 1) - binomial(n + 1, n - k + 1)*hypergeom([1, -k], [n - k + 2], -1))*(2*k + 1 - k*(n mod 2))^n. (End)
Showing 1-10 of 18 results. Next