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 25 results. Next

A000182 Tangent (or "Zag") numbers: e.g.f. tan(x), also (up to signs) e.g.f. tanh(x).

Original entry on oeis.org

1, 2, 16, 272, 7936, 353792, 22368256, 1903757312, 209865342976, 29088885112832, 4951498053124096, 1015423886506852352, 246921480190207983616, 70251601603943959887872, 23119184187809597841473536, 8713962757125169296170811392, 3729407703720529571097509625856
Offset: 1

Views

Author

Keywords

Comments

Number of Joyce trees with 2n-1 nodes. Number of tremolo permutations of {0,1,...,2n}. - Ralf Stephan, Mar 28 2003
The Hankel transform of this sequence is A000178(n) for n odd = 1, 12, 34560, ...; example: det([1, 2, 16; 2, 16, 272, 16, 272, 7936]) = 34560. - Philippe Deléham, Mar 07 2004
a(n) is the number of increasing labeled full binary trees with 2n-1 vertices. Full binary means every non-leaf vertex has two children, distinguished as left and right; labeled means the vertices are labeled 1,2,...,2n-1; increasing means every child has a label greater than its parent. - David Callan, Nov 29 2007
From Micha Hofri (hofri(AT)wpi.edu), May 27 2009: (Start)
a(n) was found to be the number of permutations of [2n] which when inserted in order, to form a binary search tree, yield the maximally full possible tree (with only one single-child node).
The e.g.f. is sec^2(x)=1+tan^2(x), and the same coefficients can be manufactured from the tan(x) itself, which is the e.g.f. for the number of trees as above for odd number of nodes. (End)
a(n) is the number of increasing strict binary trees with 2n-1 nodes. For more information about increasing strict binary trees with an associated permutation, see A245894. - Manda Riehl, Aug 07 2014
For relations to alternating permutations, Euler and Bernoulli polynomials, zigzag numbers, trigonometric functions, Fourier transform of a square wave, quantum algebras, and integrals over and in n-dimensional hypercubes and over Green functions, see Hodges and Sukumar. For further discussion on the quantum algebra, see the later Hodges and Sukumar reference and the paper by Hetyei presenting connections to the general combinatorial theory of Viennot on orthogonal polynomials, inverse polynomials, tridiagonal matrices, and lattice paths (thereby related to continued fractions and cumulants). - Tom Copeland, Nov 30 2014
The Zigzag Hankel transform is A000178. That is, A000178(2*n - k) = det( [a(i+j - k)]{i,j = 1..n} ) for n>0 and k=0,1. - _Michael Somos, Mar 12 2015
a(n) is the number of standard Young tableaux of skew shape (n,n,n-1,n-2,...,3,2)/(n-1,n-2,n-3,...,2,1). - Ran Pan, Apr 10 2015
For relations to the Sheffer Appell operator calculus and a Riccati differential equation for generating the Meixner-Pollaczek and Krawtchouk orthogonal polynomials, see page 45 of the Feinsilver link and Rzadkowski. - Tom Copeland, Sep 28 2015
For relations to an elliptic curve, a Weierstrass elliptic function, the Lorentz formal group law, a Lie infinitesimal generator, and the Eulerian numbers A008292, see A155585. - Tom Copeland, Sep 30 2015
Absolute values of the alternating sums of the odd-numbered rows (where the single 1 at the apex of the triangle is counted as row #1) of the Eulerian triangle, A008292. The actual alternating sums alternate in sign, e.g., 1, -2, 16, -272, etc. (Even-numbered rows have alternating sums always 0.) - Gregory Gerard Wojnar, Sep 28 2018
The sequence 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 1]. - Allen Stenger, Aug 03 2020
From Peter Bala, Dec 24 2021: (Start)
Conjectures:
1) The sequence taken modulo any integer k eventually becomes periodic with period dividing phi(k).
2) The Gauss congruences a(n*p^k) == a(n*p^(k-1)) ( mod p^k ) hold for all prime p and positive integers n and k, except when p = 2, n = 1 and k = 1 or 2.
3) For i >= 1 define a_i(n) = a(n+i). The Gauss congruences a_i(n*p^k) == a_i(n*p^(k-1)) ( mod p^k ) hold for all prime p and positive integers n and k. If true, then for each i >= 1 the expansion of exp(Sum_{n >= 1} a_i(n)*x^n/n) has integer coefficients. For an example, see A262145.(End)

Examples

			tan(x) = x + 2*x^3/3! + 16*x^5/5! + 272*x^7/7! + ... = x + 1/3*x^3 + 2/15*x^5 + 17/315*x^7 + 62/2835*x^9 + O(x^11).
tanh(x) = x - 1/3*x^3 + 2/15*x^5 - 17/315*x^7 + 62/2835*x^9 - 1382/155925*x^11 + ...
(sec x)^2 = 1 + x^2 + 2/3*x^4 + 17/45*x^6 + ...
a(3)=16 because we have: {1, 3, 2, 5, 4}, {1, 4, 2, 5, 3}, {1, 4, 3, 5, 2},
  {1, 5, 2, 4, 3}, {1, 5, 3, 4, 2}, {2, 3, 1, 5, 4}, {2, 4, 1, 5, 3},
  {2, 4, 3, 5, 1}, {2, 5, 1, 4, 3}, {2, 5, 3, 4, 1}, {3, 4, 1, 5, 2},
  {3, 4, 2, 5, 1}, {3, 5, 1, 4, 2}, {3, 5, 2, 4, 1}, {4, 5, 1, 3, 2},
  {4, 5, 2, 3, 1}. - _Geoffrey Critzer_, May 19 2013
		

References

  • Miklos Bona, editor, Handbook of Enumerative Combinatorics, CRC Press, 2015, page 932.
  • L. Comtet, Advanced Combinatorics, Reidel, 1974, p. 88.
  • John H. Conway and Richard K. Guy, The Book of Numbers, New York: Springer-Verlag, 1996. See p. 111.
  • H. Doerrie, 100 Great Problems of Elementary Mathematics, Dover, NY, 1965, p. 69.
  • L. M. Milne-Thompson, Calculus of Finite Differences, 1951, p. 148 (the numbers |C^{2n-1}|).
  • J. W. Milnor and J. D. Stasheff, Characteristic Classes, Princeton, 1974, p. 282.
  • S. Mukai, An Introduction to Invariants and Moduli, Cambridge, 2003; see p. 444.
  • H. Rademacher, Topics in Analytic Number Theory, Springer, 1973, Chap. 1, p. 20.
  • L. Seidel, Über eine einfache Entstehungsweise der Bernoullischen 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).
  • E. van Fossen Conrad, Some continued fraction expansions of elliptic functions, PhD thesis, The Ohio State University, 2002, p. 28.
  • J. V. Uspensky and M. A. Heaslet, Elementary Number Theory, McGraw-Hill, NY, 1939, pp. 267-268.

Crossrefs

A350972 is essentially the same sequence.
a(n)=2^(n-1)*A002105(n). Apart from signs, 2^(2n-2)*A001469(n) = n*a(n).
Cf. A001469, A002430, A036279, A000364 (secant numbers), A000111 (secant-tangent numbers), A024283, A009764. First diagonal of A059419 and of A064190.
Equals A002425(n) * 2^A101921(n).
Equals leftmost column of A162005. - Johannes W. Meijer, Jun 27 2009

Programs

  • Maple
    series(tan(x),x,40);
    with(numtheory): a := n-> abs(2^(2*n)*(2^(2*n)-1)*bernoulli(2*n)/(2*n));
    A000182_list := proc(n) local T,k,j; T[1] := 1;
    for k from 2 to n do T[k] := (k-1)*T[k-1] od;
       for k from 2 to n do
           for j from k to n do
               T[j] := (j-k)*T[j-1]+(j-k+2)*T[j] od od;
    seq(T[j], j=1..n)  end:
    A000182_list(15);  # Peter Luschny, Apr 02 2012
  • Mathematica
    Table[ Sum[2^(2*n + 1 - k)*(-1)^(n + k + 1)*k!*StirlingS2[2*n + 1, k], {k, 1, 2*n + 1}], {n, 0, 7}] (* Victor Adamchik, Oct 05 2005 *)
    v[1] = 2; v[n_] /; n >= 2 := v[n] = Sum[ Binomial[2 n - 3, 2 k - 2] v[k] v[n - k], {k, n - 1}]; Table[ v[n]/2, {n, 15}] (* Zerinvary Lajos, Jul 08 2009 *)
    Rest@ Union[ Range[0, 29]! CoefficientList[ Series[ Tan[x], {x, 0, 30}], x]] (* Harvey P. Dale, Oct 19 2011; modified by Robert G. Wilson v, Apr 02 2012 *)
    t[1, 1] = 1; t[1, 0] = 0; t[n_ /; n > 1, m_] := t[n, m] = m*(m+1)*Sum[t[n-1, k], {k, m-1, n-1}]; a[n_] := t[n, 1]; Table[a[n], {n, 1, 15}]  (* Jean-François Alcover, Jan 02 2013, after A064190 *)
    a[ n_] := If[ n < 1, 0, With[{m = 2 n - 1}, m! SeriesCoefficient[ Tan[x], {x, 0, m}]]]; (* Michael Somos, Mar 12 2015 *)
    a[ n_] := If[ n < 1, 0, ((-16)^n - (-4)^n) Zeta[1 - 2 n]]; (* Michael Somos, Mar 12 2015 *)
    Table[2 PolyGamma[2n - 1, 1/2]/Pi^(2n), {n, 1, 10}] (* Vladimir Reshetnikov, Oct 18 2015 *)
    a[ n_] := a[n] = If[ n < 2, Boole[n == 1], Sum[Binomial[2 n - 2, 2 k - 1] a[k] a[n - k], {k, n - 1}]]; (* Michael Somos, Aug 02 2018 *)
    a[n_] := (2^(2*n)*(2^(2*n) - 1)*Abs[BernoulliB[2*n]])/(2*n); a /@  Range[20]  (* Stan Wagon, Nov 21 2022 *)
  • Maxima
    a(n):=sum(sum(binomial(k,r)*sum(sum(binomial(l,j)/2^(j-1)*sum((-1)^(n)*binomial(j,i)*(j-2*i)^(2*n),i,0,floor((j-1)/2))*(-1)^(l-j),j,1,l)*(-1)^l*binomial(r+l-1,r-1),l,1,2*n)*(-1)^(1-r),r,1,k)/k,k,1,2*n); /* Vladimir Kruchinin, Aug 23 2010 */
    
  • Maxima
    a[n]:=if n=1 then 1 else 2*sum(sum(binomial(2*j,j+k)*(-4*k^2)^(n-1)*(-1)^k/(4^j),k,1,j),j,1,n-1);
    makelist(a[n],n,1,30); /* Tani Akinari, Sep 20 2023 */
    
  • PARI
    {a(n) = if( n<1, 0, ((-4)^n - (-16)^n) * bernfrac(2*n) / (2*n))};
    
  • PARI
    {a(n) = my(an); if( n<2, n==1, an = vector(n, m, 1); for( m=2, n, an[m] = sum( k=1, m-1, binomial(2*m - 2, 2*k - 1) * an[k] * an[m-k])); an[n])}; /* Michael Somos */
    
  • PARI
    {a(n) = if( n<1, 0, (2*n - 1)! * polcoeff( tan(x + O(x^(2*n + 2))), 2*n - 1))}; /* Michael Somos */
    
  • PARI
    {a(n) = my(X=x+x*O(x^n),Egf); Egf = x*sum(m=0,n, prod(k=1,m, tanh(2*k*X))); (n-1)!*polcoeff(Egf,n)} /* Paul D. Hanna, May 11 2010 */
    
  • PARI
    /* Continued Fraction for the e.g.f. tan(x), from Paul D. Hanna: */
    {a(n)=local(CF=1+O(x)); for(i=1, n, CF=1/(2*(n-i+1)-1-x^2*CF)); (2*n-1)!*polcoeff(x*CF, 2*n-1)}
    
  • PARI
    /* O.g.f. Sum_{n>=1} a(n)*x^n, from Paul D. Hanna Feb 05 2013: */
    {a(n)=polcoeff( x+2*x*sum(m=1, n, x^m*prod(k=1, m, (2*k-1)^2/(1+(2*k-1)^2*x +x*O(x^n))) ), n)}
    
  • Python
    # The objective of this implementation is efficiency.
    # n -> [0, a(1), a(2), ..., a(n)] for n > 0.
    def A000182_list(n):
        T = [0 for i in range(1, n+2)]
        T[1] = 1
        for k in range(2, n+1):
            T[k] = (k-1)*T[k-1]
        for k in range(2, n+1):
            for j in range(k, n+1):
                T[j] = (j-k)*T[j-1]+(j-k+2)*T[j]
        return T
    print(A000182_list(100)) # Peter Luschny, Aug 07 2011
    
  • Python
    from sympy import bernoulli
    def A000182(n): return abs(((2-(2<<(m:=n<<1)))*bernoulli(m)<Chai Wah Wu, Apr 14 2023
    
  • Sage
    # Algorithm of L. Seidel (1877)
    # n -> [a(1), ..., a(n)] for n >= 1.
    def A000182_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
    A000182_list(15) # Peter Luschny, Mar 31 2012

Formula

E.g.f.: log(sec x) = Sum_{n > 0} a(n)*x^(2*n)/(2*n)!.
E.g.f.: tan x = Sum_{n >= 0} a(n+1)*x^(2*n+1)/(2*n+1)!.
E.g.f.: (sec x)^2 = Sum_{n >= 0} a(n+1)*x^(2*n)/(2*n)!.
2/(exp(2x)+1) = 1 + Sum_{n>=1} (-1)^(n+1) a(n) x^(2n-1)/(2n-1)! = 1 - x + x^3/3 - 2*x^5/15 + 17*x^7/315 - 62*x^9/2835 + ...
a(n) = 2^(2*n) (2^(2*n) - 1) |B_(2*n)| / (2*n) where B_n are the Bernoulli numbers (A000367/A002445 or A027641/A027642).
Asymptotics: a(n) ~ 2^(2*n+1)*(2*n-1)!/Pi^(2*n).
Sum[2^(2*n + 1 - k)*(-1)^(n + k + 1)*k!*StirlingS2[2*n + 1, k], {k, 1, 2*n + 1}]. - Victor Adamchik, Oct 05 2005
a(n) = abs[c(2*n-1)] where c(n)= 2^(n+1) * (1-2^(n+1)) * Ber(n+1)/(n+1) = 2^(n+1) * (1-2^(n+1)) * (-1)^n * Zeta(-n) = [ -(1+EN(.))]^n = 2^n * GN(n+1)/(n+1) = 2^n * EP(n,0) = (-1)^n * E(n,-1) = (-2)^n * n! * Lag[n,-P(.,-1)/2] umbrally = (-2)^n * n! * C{T[.,P(.,-1)/2] + n, n} umbrally for the signed Euler numbers EN(n), the Bernoulli numbers Ber(n), the Genocchi numbers GN(n), the Euler polynomials EP(n,t), the Eulerian polynomials E(n,t), the Touchard / Bell polynomials T(n,t), the binomial function C(x,y) = x!/[(x-y)!*y! ] and the polynomials P(j,t) of A131758. - Tom Copeland, Oct 05 2007
a(1) = A094665(0,0)*A156919(0,0) and a(n) = Sum_{k=1..n-1} 2^(n-k-1)*A094665(n-1, k)*A156919(k,0) for n = 2, 3, .., see A162005. - Johannes W. Meijer, Jun 27 2009
G.f.: 1/(1-1*2*x/(1-2*3*x/(1-3*4*x/(1-4*5*x/(1-5*6*x/(1-... (continued fraction). - Paul Barry, Feb 24 2010
From Paul Barry, Mar 29 2010: (Start)
G.f.: 1/(1-2x-12x^2/(1-18x-240x^2/(1-50x-1260x^2/(1-98x-4032x^2/(1-162x-9900x^2/(1-... (continued fraction);
coefficient sequences given by 4*(n+1)^2*(2n+1)*(2n+3) and 2(2n+1)^2 (see Van Fossen Conrad reference). (End)
E.g.f.: x*Sum_{n>=0} Product_{k=1..n} tanh(2*k*x) = Sum_{n>=1} a(n)*x^n/(n-1)!. - Paul D. Hanna, May 11 2010 [corrected by Paul D. Hanna, Sep 28 2023]
a(n) = (-1)^(n+1)*Sum_{j=1..2*n+1} j!*Stirling2(2*n+1,j)*2^(2*n+1-j)*(-1)^j for n >= 0. Vladimir Kruchinin, Aug 23 2010: (Start)
If n is odd such that 2*n-1 is prime, then a(n) == 1 (mod (2*n-1)); if n is even such that 2*n-1 is prime, then a(n) == -1 (mod (2*n-1)). - Vladimir Shevelev, Sep 01 2010
Recursion: a(n) = (-1)^(n-1) + Sum_{i=1..n-1} (-1)^(n-i+1)*C(2*n-1,2*i-1)* a(i). - Vladimir Shevelev, Aug 08 2011
E.g.f.: tan(x) = Sum_{n>=1} a(n)*x^(2*n-1)/(2*n-1)! = x/(1 - x^2/(3 - x^2/(5 - x^2/(7 - x^2/(9 - x^2/(11 - x^2/(13 -...))))))) (continued fraction from J. H. Lambert - 1761). - Paul D. Hanna, Sep 21 2011
From Sergei N. Gladkovskii, Oct 31 2011 to Oct 09 2013: (Start)
Continued fractions:
E.g.f.: (sec(x))^2 = 1+x^2/(x^2+U(0)) where U(k) = (k+1)*(2k+1) - 2x^2 + 2x^2*(k+1)*(2k+1)/U(k+1).
E.g.f.: tan(x) = x*T(0) where T(k) = 1-x^2/(x^2-(2k+1)*(2k+3)/T(k+1)).
E.g.f.: tan(x) = x/(G(0)+x) where G(k) = 2*k+1 - 2*x + x/(1 + x/G(k+1)).
E.g.f.: tanh(x) = x/(G(0)-x) where G(k) = k+1 + 2*x - 2*x*(k+1)/G(k+1).
E.g.f.: tan(x) = 2*x - x/W(0) where W(k) = 1 + x^2*(4*k+5)/((4*k+1)*(4*k+3)*(4*k+5) - 4*x^2*(4*k+3) + x^2*(4*k+1)/W(k+1)).
E.g.f.: tan(x) = x/T(0) where T(k) = 1 - 4*k^2 + x^2*(1 - 4*k^2)/T(k+1).
E.g.f.: tan(x) = -3*x/(T(0)+3*x^2) where T(k)= 64*k^3 + 48*k^2 - 4*k*(2*x^2 + 1) - 2*x^2 - 3 - x^4*(4*k -1)*(4*k+7)/T(k+1).
G.f.: 1/G(0) where G(k) = 1 - 2*x*(2*k+1)^2 - x^2*(2*k+1)*(2*k+2)^2*(2*k+3)/G(k+1).
G.f.: 2*Q(0) - 1 where Q(k) = 1 + x^2*(4*k + 1)^2/(x + x^2*(4*k + 1)^2 - x^2*(4*k + 3)^2*(x + x^2*(4*k + 1)^2)/(x^2*(4*k + 3)^2 + (x + x^2*(4*k + 3)^2)/Q(k+1) )).
G.f.: (1 - 1/G(0))*sqrt(-x), where G(k) = 1 + sqrt(-x) - x*(k+1)^2/G(k+1).
G.f.: Q(0), where Q(k) = 1 - x*(k+1)*(k+2)/( x*(k+1)*(k+2) - 1/Q(k+1)). (End)
O.g.f.: x + 2*x*Sum_{n>=1} x^n * Product_{k=1..n} (2*k-1)^2 / (1 + (2*k-1)^2*x). - Paul D. Hanna, Feb 05 2013
a(n) = (-4)^n*Li_{1-2*n}(-1). - Peter Luschny, Jun 28 2012
a(n) = (-4)^n*(4^n-1)*Zeta(1-2*n). - Jean-François Alcover, Dec 05 2013
Asymptotic expansion: 4*((2*(2*n-1))/(Pi*e))^(2*n-1/2)*exp(1/2+1/(12*(2*n-1))-1/(360*(2*n-1)^3)+1/(1260*(2*n-1)^5)-...). (See Luschny link.) - Peter Luschny, Jul 14 2015
From Peter Bala, Sep 11 2015: (Start)
The e.g.f. A(x) = tan(x) satisfies the differential equation A''(x) = 2*A(x)*A'(x) with A(0) = 0 and A'(0) = 1, leading to the recurrence a(0) = 0, a(1) = 1, else a(n) = 2*Sum_{i = 0..n-2} binomial(n-2,i)*a(i)*a(n-1-i) for the aerated sequence [0, 1, 0, 2, 0, 16, 0, 272, ...].
Note, the same recurrence, but with the initial conditions a(0) = 1 and a(1) = 1, produces the sequence n! and with a(0) = 1/2 and a(1) = 1 produces A080635. Cf. A002105, A234797. (End)
a(n) = 2*polygamma(2*n-1, 1/2)/Pi^(2*n). - Vladimir Reshetnikov, Oct 18 2015
a(n) = 2^(2n-2)*|p(2n-1,-1/2)|, where p_n(x) are the shifted row polynomials of A019538. E.g., a(2) = 2 = 2^2 * |1 + 6(-1/2) + 6(-1/2)^2|. - Tom Copeland, Oct 19 2016
From Peter Bala, May 05 2017: (Start)
With offset 0, the o.g.f. A(x) = 1 + 2*x + 16*x^2 + 272*x^3 + ... has the property that its 4th binomial transform 1/(1 - 4*x) A(x/(1 - 4*x)) has the S-fraction representation 1/(1 - 6*x/(1 - 2*x/(1 - 20*x/(1 - 12*x/(1 - 42*x/(1 - 30*x/(1 - ...))))))), where the coefficients [6, 2, 20, 12, 42, 30, ...] in the partial numerators of the continued fraction are obtained from the sequence [2, 6, 12, 20, ..., n*(n + 1), ...] by swapping adjacent terms. Compare with the S-fraction associated with A(x) given above by Paul Barry.
A(x) = 1/(1 + x - 3*x/(1 - 4*x/(1 + x - 15*x/(1 - 16*x/(1 + x - 35*x/(1 - 36*x/(1 + x - ...))))))), where the unsigned coefficients in the partial numerators [3, 4, 15, 16, 35, 36,...] come in pairs of the form 4*n^2 - 1, 4*n^2 for n = 1,2,.... (End)
a(n) = Sum_{k = 1..n-1} binomial(2*n-2, 2*k-1) * a(k) * a(n-k), with a(1) = 1. - Michael Somos, Aug 02 2018
a(n) = 2^(2*n-1) * |Euler(2*n-1, 0)|, where Euler(n,x) are the Euler polynomials. - Daniel Suteu, Nov 21 2018 (restatement of one of Copeland's 2007 formulas.)
x - Sum_{n >= 1} (-1)^n*a(n)*x^(2*n)/(2*n)! = x - log(cosh(x)). The series reversion of x - log(cosh(x)) is (1/2)*x - (1/2)*log(2 - exp(x)) = Sum_{n >= 0} A000670(n)*x^(n+1)/(n+1)!. - Peter Bala, Jul 11 2022
For n > 1, a(n) = 2*Sum_{j=1..n-1} Sum_{k=1..j} binomial(2*j,j+k)*(-4*k^2)^(n-1)*(-1)^k/(4^j). - Tani Akinari, Sep 20 2023
a(n) = A110501(n) * 4^(n-1) / n (Han and Liu, 2018). - Amiram Eldar, May 17 2024

A123125 Triangle of Eulerian numbers T(n,k), 0 <= k <= n, read by rows.

Original entry on oeis.org

1, 0, 1, 0, 1, 1, 0, 1, 4, 1, 0, 1, 11, 11, 1, 0, 1, 26, 66, 26, 1, 0, 1, 57, 302, 302, 57, 1, 0, 1, 120, 1191, 2416, 1191, 120, 1, 0, 1, 247, 4293, 15619, 15619, 4293, 247, 1, 0, 1, 502, 14608, 88234, 156190, 88234, 14608, 502, 1, 0, 1, 1013, 47840, 455192, 1310354, 1310354, 455192, 47840, 1013, 1
Offset: 0

Views

Author

Philippe Deléham, Sep 30 2006

Keywords

Comments

The beginning of this sequence does not quite agree with the usual version, which is A173018. - N. J. A. Sloane, Nov 21 2010
Each row of A123125 is the reverse of the corresponding row in A173018. - Michael Somos, Mar 17 2011
A008292 (subtriangle for k>=1 and n>=1) is the main entry for these numbers.
Triangle T(n,k), 0 <= k <= n, read by rows given by [0,1,0,2,0,3,0,4,0,5,0,...] DELTA [1,0,2,0,3,0,4,0,5,0,6,...] where DELTA is the operator defined in A084938.
Row sums are the factorials. - Roger L. Bagula and Gary W. Adamson, Aug 14 2008
If the initial zero column is deleted, the result is A008292. - Roger L. Bagula and Gary W. Adamson, Aug 14 2008
This result gives an alternative method of calculating the Eulerian numbers by an Umbral Calculus expansion from Comtet. - Roger L. Bagula, Nov 21 2009
This function seems to be equivalent to the PolyLog expansion. - Roger L. Bagula, Nov 21 2009
A raising operator formed from the e.g.f. of this entry is the generator of a sequence of polynomials p(n,x;t) defined in A046802 that specialize to those for A119879 as p(n,x;-1), A007318 as p(n,x;0), A073107 as p(n,x;1), and A046802 as p(n,0;t). See Copeland link for more associations. - Tom Copeland, Oct 20 2015
The Eulerian numbers in this setup count the permutation trees of power n and width k (see the Luschny link). For the associated combinatorial statistic over permutations see the Sage program below and the example section. - Peter Luschny, Dec 09 2015 [See Elder et al. link. Peter Luschny, Jul 13 2022]
From Wolfdieter Lang, Apr 03 2017: (Start)
The row polynomials R(n, x) = Sum_{k=0..n} T(n, k)*x^k are the numerator polynomials of the o.g.f. G(n, x) of n-powers {m^n}_{m>=0} (with 0^0 = 1): G(n, x) = R(n, x)/(1-x)^(n+1). See the Aug 14 2008 formula, where f(x,n) = R(n, x). The e.g.f. of R(n, t) is given in Copeland's Oct 14 2015 formula below.
The first nine column sequences are A000007, A000012, A000295, A000460, A000498, A000505, A000514, A001243, A001244. (End)
With all offsets 0, let A_n(x;y) = (y + E.(x))^n, an Appell sequence in y where E.(x)^k = E_k(x) are the Eulerian polynomials of this entry, A123125. Then the row polynomials of A046802 (the h-polynomials of the stellahedra) are given by h_n(x) = A_n(x;1); the row polynomials of A248727 (the face polynomials of the stellahedra), by f_n(x) = A_n(1 + x;1); the Swiss-knife polynomials of A119879, by Sw_n(x) = A_n(-1;1 + x); and the row polynomials of the Worpitsky triangle (A130850), by w_n(x) = A(1 + x;0). Other specializations of A_n(x;y) give A090582 (the f-polynomials of the permutohedra, cf. also A019538) and A028246 (another version of the Worpitsky triangle). - Tom Copeland, Jan 24 2020
Let b(n) = (1/(n+1))*Sum_{k=0..n-1} (-1)^(n-k+1)*T(n, k+1) / binomial(n, k+1). Then b(n) = Bernoulli(n, 1) = -n*Zeta(1 - n) = Integral_{x=0..1} F_n(x) for n >= 1. Here F_n(x) are the signed Fubini polynomials (A278075). (See also Rzadkowski and Urlinska, example 1.) - Peter Luschny, Feb 15 2021
Patrick J. Burchell (see link) describes the following method: To get the k-th row of the triangle write the nonnegative integers with a fixed exponent k as a sequence, 0^k, 1^k, 2^k, ..., and then apply the first differences to them k + 1 times. - Peter Luschny, Apr 02 2023

Examples

			The triangle T(n, k) begins:
  n\k 0 1    2     3      4       5       6      7     8    9 10...
  0:  1
  1:  0 1
  2:  0 1    1
  3:  0 1    4     1
  4:  0 1   11    11      1
  5:  0 1   26    66     26       1
  6:  0 1   57   302    302      57       1
  7:  0 1  120  1191   2416    1191     120      1
  8:  0 1  247  4293  15619   15619    4293    247     1
  9:  0 1  502 14608  88234  156190   88234  14608   502    1
 10:  0 1 1013 47840 455192 1310354 1310354 455192 47840 1013  1
...  Reformatted. - _Wolfdieter Lang_, Feb 14 2015
------------------------------------------------------------------
The width statistic over permutations, n=4.
  [1, 2, 3, 4] => 3; [1, 2, 4, 3] => 2; [1, 3, 2, 4] => 2; [1, 3, 4, 2] => 2;
  [1, 4, 2, 3] => 2; [1, 4, 3, 2] => 1; [2, 1, 3, 4] => 3; [2, 1, 4, 3] => 2;
  [2, 3, 1, 4] => 2; [2, 3, 4, 1] => 3; [2, 4, 1, 3] => 2; [2, 4, 3, 1] => 2;
  [3, 1, 2, 4] => 3; [3, 1, 4, 2] => 3; [3, 2, 1, 4] => 2; [3, 2, 4, 1] => 3;
  [3, 4, 1, 2] => 3; [3, 4, 2, 1] => 2; [4, 1, 2, 3] => 4; [4, 1, 3, 2] => 3;
  [4, 2, 1, 3] => 3; [4, 2, 3, 1] => 3; [4, 3, 1, 2] => 3; [4, 3, 2, 1] => 2;
Gives row(4) = [0, 1, 11, 11, 1]. - _Peter Luschny_, Dec 09 2015
------------------------------------------------------------------
From _Wolfdieter Lang_, Apr 03 2017: (Start)
Recurrence: T(5, 3) = (6-3)*T(4, 2) + 3*T(4, 3) = 3*11 + 3*11 = 66.
O.g.f. column k=2: (x/(1 - 2*x))*E_x*(x/(1-x)) = (x/(1-x))^2/(1-2*x).
E.g.f. column k=2: A(2, x) = x*A(1, x) + x*E(1, x) = x*1 + x*(exp(x)-1) = x*exp(x), hence E(2, x) = (1 + int(x*exp(-x),x ))*exp(2*x) = exp(x)*(exp(x) - (1+x)). See A000295. (End)
		

References

  • L. Comtet, Advanced Combinatorics, Reidel, Holland, 1978, page 245. [Roger L. Bagula, Nov 21 2009]
  • Ronald L. Graham, Donald E. Knuth and Oren Patashnik, Concrete Mathematics, 2nd ed.; Addison-Wesley, 1994, p. 268, Row reversed table 268. - Wolfdieter Lang, Apr 03 2017
  • Douglas C. Montgomery and Lynwood A. Johnson, Forecasting and Time Series Analysis, MaGraw-Hill, New York, 1976, page 91. - Roger L. Bagula and Gary W. Adamson, Aug 14 2008

Crossrefs

See A008292 (subtriangle for k>=1 and n>=1), which is the main entry for these numbers. Another version has the zeros at the ends of the rows, as in Concrete Mathematics: see A173018.
T(2n,n) gives A180056.

Programs

  • Haskell
    a123125 n k = a123125_tabl !! n !! k
    a123125_row n = a123125_tabl !! n
    a123125_tabl = [1] : zipWith (:) [0, 0 ..] a008292_tabl
    -- Reinhard Zumkeller, Nov 06 2013
    
  • Maple
    gf := 1/(1 - t*exp(x)): ser := series(gf, x, 12):
    cx := n -> (-1)^(n + 1)*factor(n!*coeff(ser, x, n)*(t - 1)^(n + 1)):
    seq(print(seq(coeff(cx(n), t, k), k = 0..n)), n = 0..9); # Peter Luschny, Feb 11 2021
    A123125 := proc(n, k) option remember; if k = n then 1 elif k <= 0 or k > n then 0 else k*procname(n-1, k) + (n-k+1)*procname(n-1, k-1) fi end:
    seq(print(seq(A123125(n, k), k=0..n)), n=0..10); # Peter Luschny, Mar 28 2021
    # Alternative (Patrick J. Burchell):
    t := a -> Statistics:-Difference([0, a]): Trow := k -> (t@@(k+1))([seq(n^k, n = 0..k)]):
    seq(print(Trow(n)), n = 0..6); # Peter Luschny, Apr 02 2023
  • Mathematica
    f[x_, n_] := f[x, n] = (1 - x)^(n + 1)*Sum[k^n*x^k, {k, 0, Infinity}];
    Table[CoefficientList[f[x, n], x], {n,0,9}] // Flatten (* Roger L. Bagula, Aug 14 2008 *)
    t[n_ /; n >= 0, 0] = 1; t[n_, k_] /; k<0 || k>n = 0; t[n_, k_] := t[n, k] = (n-k) t[n-1, k-1] + (k+1) t[n-1, k]; T[n_, k_] := t[n, n-k];
    Table[T[n, k], {n,0,10}, {k, 0, n}] // Flatten (* Jean-François Alcover, May 26 2019 *)
    A123125[n_, k_] := Sum[(-1)^j*(n - j - k + 1)^n * Binomial[n + 1, j], {j, 0, n - k}];
    Table[A123125[n, k], {n, 0, 9}, {k, 0, n}] // TableForm  (* Peter Luschny, Aug 12 2022 *)
  • Python
    from math import isqrt, comb
    def A123125(n):
        a = (m:=isqrt(k:=n+1<<1))+(k>m*(m+1))
        b = comb(a+1,2)-n
        return sum(-(b-j)**(a-1)*comb(a,j) if j&1 else (b-j)**(a-1)*comb(a,j) for j in range(b)) # Chai Wah Wu, Nov 13 2024
  • Sage
    def statistic_eulerian(pi):
        if not pi: return 0
        h, i, branch, next = 0, len(pi), [0], pi[0]
        while True:
            while next < branch[len(branch)-1]:
                del(branch[len(branch)-1])
            current = 0
            h += 1
            while next > current:
                i -= 1
                if i == 0: return h
                branch.append(next)
                current, next = next, pi[i]
    def A123125_row(n):
        L = [0]*(n+1)
        for p in Permutations(n):
            L[statistic_eulerian(p)] += 1
        return L
    [A123125_row(n) for n in range(7)] # Peter Luschny, Dec 09 2015
    

Formula

Sum_{k=0..n} T(n,k) = n! = A000142(n).
Sum_{k=0..n} 2^k*T(n,k) = A000629(n).
Sum_{k=0..n} 3^k*T(n,k) = abs(A009362(n+1)).
Sum_{k=0..n} 2^(n-k)*T(n,k) = A000670(n).
Sum_{k=0..n} T(n,k)*3^(n-k) = A122704(n). - Philippe Deléham, Nov 07 2007
G.f.: f(x,n) = (1 - x)^(n + 1)*Sum_{k>=0} k^n*x^k. - Roger L. Bagula and Gary W. Adamson, Aug 14 2008. f is not the g.f. of the triangle, it is the polynomial of row n. See an Apr 03 2017 comment above - Wolfdieter Lang, Apr 03 2017
Sum_{k=0..n} T(n,k)*x^k = A000007(n), A000142(n), A000629(n), A123227(n), A201355(n), A201368(n) for x = 0, 1, 2, 3, 4, 5 respectively. - Philippe Deléham, Dec 01 2011
E.g.f. (1-t)/(1-t*exp((1-t)x)). A123125 * A007318 = A130850 = unsigned A075263, related to reversed A028246. A007318 * A123125 = A046802. Evaluating the row polynomials at -1, giving the alternating-sign row sum, generates A009006. - Tom Copeland, Oct 14 2015
From Wolfdieter Lang, Apr 03 2017: (Start)
T(n, k) = A173018(n, n-k), 0 <= k <= n. Row reversed Euler's triangle. See Graham et al., p. 268.
Recurrence (from A173018): T(n, 0) = 1 if n=0 else 0; T(n, k) = 0 if n < k and T(n, k) = (n+1-k)*T(n-1, k-1) + k*T(n-1, k) else.
T(n, k) = Sum_{j=0..k} (-1)^(k-j)*binomial(n-j, k-j)*S2(n, j)*j!, 0 <= k <= n, else 0. For S2(n, k)*k! see A131689.
The recurrence for the o.g.f. of the sequence of column k is
G(k, x) = (x/(1 - k*x))*(E_x - (k-2))*G(k-1, x), with the Euler operator E_x = x*d_x, for k >= 1, with G(0, x) = 1. (Proof from the recurrence of T(n, k)).
The e.g.f of the sequence of column k is found from E(k, x) = (1 + int(A(k, x),x)*exp(-k*x))*exp(k*x), k >= 1, with the recurrence
A(k, x) = x*A(k-1, x) +(1 + (1-k)*(1-x))*E(k-1, x) for k >= 1, with A(0,x)= 0. (Proof from the recurrence of T(n, k)). (End)
T(n, k) = Sum_{j=0..n-k} (-1)^j*(n-j-k+1)^n*binomial(n + 1, j). - Peter Luschny, Aug 12 2022
G.f.: Sum_{m >= 0} x^m/(1/(1-x)-m*t). - Mamuka Jibladze, Mar 12 2025

A155585 a(n) = 2^n*E(n, 1) where E(n, x) are the Euler polynomials.

Original entry on oeis.org

1, 1, 0, -2, 0, 16, 0, -272, 0, 7936, 0, -353792, 0, 22368256, 0, -1903757312, 0, 209865342976, 0, -29088885112832, 0, 4951498053124096, 0, -1015423886506852352, 0, 246921480190207983616, 0, -70251601603943959887872, 0, 23119184187809597841473536, 0
Offset: 0

Views

Author

Paul D. Hanna, Jan 24 2009

Keywords

Comments

Previous name was: a(n) = Sum_{k=0..n-1} (-1)^(k)*C(n-1,k)*a(n-1-k)*a(k) for n>0 with a(0)=1.
Factorials have a similar recurrence: f(n) = Sum_{k=0..n-1} C(n-1,k)*f(n-1-k)*f(k), n > 0.
Related to A102573: letting T(q,r) be the coefficient of n^(r+1) in the polynomial 2^(q-n)/n times Sum_{k=0..n} binomial(n,k)*k^q, then A155585(x) = Sum_{k=0..x-1} T(x,k)*(-1)^k. See Mathematica code below. - John M. Campbell, Nov 16 2011
For the difference table and the relation to the Seidel triangle see A239005. - Paul Curtz, Mar 06 2014
From Tom Copeland, Sep 29 2015: (Start)
Let z(t) = 2/(e^(2t)+1) = 1 + tanh(-t) = e.g.f.(-t) for this sequence = 1 - t + 2*t^3/3! - 16*t^5/5! + ... .
dlog(z(t))/dt = -z(-t), so the raising operators that generate Appell polynomials associated with this sequence, A081733, and its reciprocal, A119468, contain z(-d/dx) = e.g.f.(d/dx) as the differential operator component.
dz(t)/dt = z*(z-2), so the assorted relations to a Ricatti equation, the Eulerian numbers A008292, and the Bernoulli numbers in the Rzadkowski link hold.
From Michael Somos's formula below (drawing on the Edwards link), y(t,1)=1 and x(t,1) = (1-e^(2t))/(1+e^(2t)), giving z(t) = 1 + x(t,1). Compare this to the formulas in my list in A008292 (Sep 14 2014) with a=1 and b=-1,
A) A(t,1,-1) = A(t) = -x(t,1) = (e^(2t)-1)/(1+e^(2t)) = tanh(t) = t + -2*t^3/3! + 16*t^5/5! + -272*t^7/7! + ... = e.g.f.(t) - 1 (see A000182 and A000111)
B) Ainv(t) = log((1+t)/(1-t))/2 = tanh^(-1)(t) = t + t^3/3 + t^5/5 + ..., the compositional inverse of A(t)
C) dA/dt = (1-A^2), relating A(t) to a Weierstrass elliptic function
D) ((1-t^2)d/dt)^n t evaluated at t=0, a generator for the sequence A(t)
F) FGL(x,y)= (x+y)/(1+xy) = A(Ainv(x) + Ainv(y)), a related formal group law corresponding to the Lorentz FGL (Lorentz transformation--addition of parallel velocities in special relativity) and the Atiyah-Singer signature and the elliptic curve (1-t^2)*s = t^3 in Tate coordinates according to the Lenart and Zainoulline link and the Buchstaber and Bunkova link (pp. 35-37) in A008292.
A133437 maps the reciprocal odd natural numbers through the refined faces of associahedra to a(n).
A145271 links the differential relations to the geometry of flow maps, vector fields, and thereby formal group laws. See Mathworld for links of tanh to other geometries and statistics.
Since the a(n) are related to normalized values of the Bernoulli numbers and the Riemann zeta and Dirichlet eta functions, there are links to Witten's work on volumes of manifolds in two-dimensional quantum gauge theories and the Kervaire-Milnor formula for homotopy groups of hyperspheres (see my link below).
See A101343, A111593 and A059419 for this and the related generator (1 + t^2) d/dt and associated polynomials. (End)
With the exception of the first term (1), entries are the alternating sums of the rows of the Eulerian triangle, A008292. - Gregory Gerard Wojnar, Sep 29 2018

Examples

			E.g.f.: 1 + x - 2*x^3/3! + 16*x^5/5! - 272*x^7/7! + 7936*x^9/9! -+ ... = exp(x)/cosh(x).
O.g.f.: 1 + x - 2*x^3 + 16*x^5 - 272*x^7 + 7936*x^9 - 353792*x^11 +- ...
O.g.f.: 1 + x/(1+2*x) + 2!*x^2/((1+2*x)*(1+4*x)) + 3!*x^3/((1+2*x)*(1+4*x)*(1+6*x)) + ...
		

Crossrefs

Equals row sums of A119879. - Johannes W. Meijer, Apr 20 2011
(-1)^n*a(n) are the alternating row sums of A123125. - Wolfdieter Lang, Jul 12 2017

Programs

  • Maple
    A155585 := n -> 2^n*euler(n, 1): # Peter Luschny, Jan 26 2009
    a := proc(n) option remember; `if`(n::even, 0^n, -(-1)^n - add((-1)^k*binomial(n,k) *a(n-k), k = 1..n-1)) end: # Peter Luschny, Jun 01 2016
    # Or via the recurrence of the Fubini polynomials:
    F := proc(n) option remember; if n = 0 then return 1 fi;
    expand(add(binomial(n, k)*F(n-k)*x, k = 1..n)) end:
    a := n -> (-2)^n*subs(x = -1/2, F(n)):
    seq(a(n), n = 0..30); # Peter Luschny, May 21 2021
  • Mathematica
    a[m_] := Sum[(-2)^(m - k) k! StirlingS2[m, k], {k, 0, m}] (* Peter Luschny, Apr 29 2009 *)
    poly[q_] :=  2^(q-n)/n*FunctionExpand[Sum[Binomial[n, k]*k^q, {k, 0, n}]]; T[q_, r_] :=  First[Take[CoefficientList[poly[q], n], {r+1, r+1}]]; Table[Sum[T[x, k]*(-1)^k, {k, 0, x-1}], {x, 1, 16}] (* John M. Campbell, Nov 16 2011 *)
    f[n_] := (-1)^n 2^(n+1) PolyLog[-n, -1]; f[0] = -f[0]; Array[f, 27, 0] (* Robert G. Wilson v, Jun 28 2012 *)
  • PARI
    a(n)=if(n==0,1,sum(k=0,n-1,(-1)^(k)*binomial(n-1,k)*a(n-1-k)*a(k)))
    
  • PARI
    a(n)=local(X=x+x*O(x^n));n!*polcoeff(exp(X)/cosh(X),n)
    
  • PARI
    a(n)=polcoeff(sum(m=0,n,m!*x^m/prod(k=1,m,1+2*k*x+x*O(x^n))),n) \\ Paul D. Hanna, Jul 20 2011
    
  • PARI
    {a(n) = local(A); if( n<0, 0, A = x * O(x^n); n! * polcoeff( 1 + sinh(x + A) / cosh(x + A), n))} /* Michael Somos, Jan 16 2012 */
    
  • PARI
    a(n)=local(A=1+x);for(i=1,n,A=sum(k=0,n,intformal(subst(A,x,-x)+x*O(x^n))^k/k!));n!*polcoeff(A,n)
    for(n=0,30,print1(a(n),", ")) \\ Paul D. Hanna, Nov 25 2013
    
  • Python
    from sympy import bernoulli
    def A155585(n): return (((2<<(m:=n+1))-2)*bernoulli(m)<>1) if n&1 else (0 if n else 1) # Chai Wah Wu, Apr 14 2023
  • Sage
    def A155585(n) :
        if n == 0 : return 1
        return add(add((-1)^(j+1)*binomial(n+1,k-j)*j^n for j in (0..k)) for k in (1..n))
    [A155585(n) for n in (0..26)] # Peter Luschny, Jul 23 2012
    
  • Sage
    def A155585_list(n): # Akiyama-Tanigawa algorithm
        A = [0]*(n+1); R = []
        for m in range(n+1) :
            d = divmod(m+3, 4)
            A[m] = 0 if d[1] == 0 else (-1)^d[0]/2^(m//2)
            for j in range(m, 0, -1) :
                A[j - 1] = j * (A[j - 1] - A[j])
            R.append(A[0])
        return R
    A155585_list(30) # Peter Luschny, Mar 09 2014
    

Formula

E.g.f.: exp(x)*sech(x) = exp(x)/cosh(x). (See A009006.) - Paul Barry, Mar 15 2006
Sequence of absolute values is A009006 (e.g.f. 1+tan(x)).
O.g.f.: Sum_{n>=0} n! * x^n / Product_{k=1..n} (1 + 2*k*x). - Paul D. Hanna, Jul 20 2011
a(n) = 2^n*E_{n}(1) where E_{n}(x) are the Euler polynomials. - Peter Luschny, Jan 26 2009
a(n) = EL_{n}(-1) where EL_{n}(x) are the Eulerian polynomials. - Peter Luschny, Aug 03 2010
a(n+1) = (4^n-2^n)*B_n(1)/n, where B_{n}(x) are the Bernoulli polynomials (B_n(1) = B_n for n <> 1). - Peter Luschny, Apr 22 2009
G.f.: 1/(1-x+x^2/(1-x+4*x^2/(1-x+9*x^2/(1-x+16*x^2/(1-...))))) (continued fraction). - Paul Barry, Mar 30 2010
G.f.: -log(x/(exp(x)-1))/x = Sum_{n>=0} a(n)*x^n/(2^(n+1)*(2^(n+1)-1)*n!). - Vladimir Kruchinin, Nov 05 2011
E.g.f.: exp(x)/cosh(x) = 2/(1+exp(-2*x)) = 2/(G(0) + 1); G(k) = 1 - 2*x/(2*k + 1 - x*(2*k+1)/(x - (k+1)/G(k+1))); (continued fraction). - Sergei N. Gladkovskii, Dec 10 2011
E.g.f. is x(t,1) + y(t,1) where x(t,a) and y(t,a) satisfy y(t,a)^2 = (a^2 - x(t,a)^2) / (1 - a^2 * x(t,a)^2) and dx(t,a) / dt = y(t,a) * (1 - a * x(t,a)^2) and are the elliptic functions of Edwards. - Michael Somos, Jan 16 2012
E.g.f.: 1/(1 - x/(1+x/(1 - x/(3+x/(1 - x/(5+x/(1 - x/(7+x/(1 - x/(9+x/(1 +...))))))))))), a continued fraction. - Paul D. Hanna, Feb 11 2012
E.g.f. satisfies: A(x) = Sum_{n>=0} Integral( A(-x) dx )^n / n!. - Paul D. Hanna, Nov 25 2013
a(n) = -2^(n+1)*Li_{-n}(-1). - Peter Luschny, Jun 28 2012
a(n) = Sum_{k=1..n} Sum_{j=0..k} (-1)^(j+1)*binomial(n+1,k-j)*j^n for n > 0. - Peter Luschny, Jul 23 2012
From Sergei N. Gladkovskii, Oct 25 2012 to Dec 16 2013: (Start)
Continued fractions:
G.f.: 1 + x/T(0) where T(k) = 1 + (k+1)*(k+2)*x^2/T(k+1).
E.g.f.: exp(x)/cosh(x) = 1 + x/S(0) where S(k) = (2*k+1) + x^2/S(k+1).
E.g.f.: 1 + x/(U(0)+x) where U(k) = 4*k+1 - x/(1 + x/(4*k+3 - x/(1 + x/U(k+1)))).
E.g.f.: 1 + tanh(x) = 4*x/(G(0)+2*x) where G(k) = 1 - (k+1)/(1 - 2*x/(2*x + (k+1)^2/G(k+1)));
G.f.: 1 + x/G(0) where G(k) = 1 + 2*x^2*(2*k+1)^2 - x^4*(2*k+1)*(2*k+2)^2*(2*k+3)/G(k+1) (due to Stieltjes).
E.g.f.: 1 + x/(G(0) + x) where G(k) = 1 - 2*x/(1 + (k+1)/G(k+1)).
G.f.: 2 - 1/Q(0) where Q(k) = 1 + x*(k+1)/( 1 - x*(k+1)/Q(k+1)).
G.f.: 2 - 1/Q(0) where Q(k) = 1 + x*k^2 + x/(1 - x*(k+1)^2/Q(k+1)).
G.f.: 1/Q(0) where Q(k) = 1 - 2*x + x*(k+1)/(1-x*(k+1)/Q(k+1)).
G.f.: 1/Q(0) where Q(k) = 1 - x*(k+1)/(1 + x*(k+1)/Q(k+1)).
E.g.f.: 1 + x*Q(0) where Q(k) = 1 - x^2/( x^2 + (2*k+1)*(2*k+3)/Q(k+1)).
G.f.: 2 - T(0)/(1+x) where T(k) = 1 - x^2*(k+1)^2/(x^2*(k+1)^2 + (1+x)^2/T(k+1)).
E.g.f.: 1/(x - Q(0)) where Q(k) = 4*k^2 - 1 + 2*x + x^2*(2*k-1)*(2*k+3)/Q(k+1). (End)
G.f.: 1 / (1 - b(1)*x / (1 - b(2)*x / (1 - b(3)*x / ... ))) where b = A001057. - Michael Somos, Jan 03 2013
From Paul Curtz, Mar 06 2014: (Start)
a(2n) = A000007(n).
a(2n+1) = (-1)^n*A000182(n+1).
a(n) is the binomial transform of A122045(n).
a(n) is the row sum of A081658. For fractional Euler numbers see A238800.
a(n) + A122045(n) = 2, 1, -1, -2, 5, 16, ... = -A163982(n).
a(n) - A122045(n) = -A163747(n).
a(n) is the Akiyama-Tanigawa transform applied to 1, 0, -1/2, -1/2, -1/4, 0, ... = A046978(n+3)/A016116(n). (End)
a(n) = 2^(2*n+1)*(zeta(-n,1/2) - zeta(-n, 1)), where zeta(a, z) is the generalized Riemann zeta function. - Peter Luschny, Mar 11 2015
a(n) = 2^(n + 1)*(2^(n + 1) - 1)*Bernoulli(n + 1, 1)/(n + 1). (From Bill Gosper, Oct 28 2015) - N. J. A. Sloane, Oct 28 2015 [See the above comment from Peter Luschny, Apr 22 2009.]
a(n) = -(n mod 2)*((-1)^n + Sum_{k=1..n-1} (-1)^k*C(n,k)*a(n-k)) for n >= 1. - Peter Luschny, Jun 01 2016
a(n) = (-2)^n*F_{n}(-1/2), where F_{n}(x) is the Fubini polynomial. - Peter Luschny, May 21 2021

Extensions

New name from Peter Luschny, Mar 12 2015

A153641 Nonzero coefficients of the Swiss-Knife polynomials for the computation of Euler, tangent, and Bernoulli numbers (triangle read by rows).

Original entry on oeis.org

1, 1, 1, -1, 1, -3, 1, -6, 5, 1, -10, 25, 1, -15, 75, -61, 1, -21, 175, -427, 1, -28, 350, -1708, 1385, 1, -36, 630, -5124, 12465, 1, -45, 1050, -12810, 62325, -50521, 1, -55, 1650, -28182, 228525, -555731, 1, -66, 2475, -56364, 685575, -3334386, 2702765, 1
Offset: 0

Views

Author

Peter Luschny, Dec 29 2008

Keywords

Comments

In the following the expression [n odd] is 1 if n is odd, 0 otherwise.
(+) W_n(0) = E_n are the Euler (or secant) numbers A122045.
(+) W_n(1) = T_n are the signed tangent numbers, see A009006.
(+) W_{n-1}(1) n / (4^n - 2^n) = B_n gives for n > 1 the Bernoulli number A027641/A027642.
(+) W_n(-1) 2^{-n}(n+1) = G_n the Genocchi number A036968.
(+) W_n(1/2) 2^{n} are the signed generalized Euler (Springer) number, see A001586.
(+) | W_n([n odd]) | the number of alternating permutations A000111.
(+) | W_n([n odd]) / n! | for 0<=n the Euler zeta number A099612/A099617 (see Wikipedia on Bernoulli number). - Peter Luschny, Dec 29 2008
The diagonals in the full triangle (with zero coefficients) of the polynomials have the general form E(k)*binomial(n+k,k) (k>=0 fixed, n=0,1,...) where E(n) are the Euler numbers in the enumeration A122045. For k=2 we find the triangular numbers A000217 and for k=4 A154286. - Peter Luschny, Jan 06 2009
From Peter Bala, Jun 10 2009: (Start)
The Swiss-Knife polynomials W_n(x) may be expressed in terms of the Bernoulli polynomials B(n,x) as
... W_n(x) = 4^(n+1)/(2*n+2)*[B(n+1,(x+3)/4) - B(n+1,(x+1)/4)].
The Swiss-Knife polynomials are, apart from a multiplying factor, examples of generalized Bernoulli polynomials.
Let X be the Dirichlet character modulus 4 defined by X(4*n+1) = 1, X(4*n+3) = -1 and X(2*n) = 0. The generalized Bernoulli polynomials B(X;n,x), n = 1,2,..., associated with the character X are defined by means of the generating function
... t*exp(x*t)*(exp(t)-exp(3*t))/(exp(4*t)-1) = sum {n = 1..inf} B(X;n,x)*t^n/n!.
The first few values are B(X;1,x) = -1/2, B(X;2,x) = -x, B(X,3,x) = -3/2*(x^2-1) and B(X;4,x) = -2*(x^3-3*x).
In general, W_n(x) = -2/(n+1)*B(X;n+1,x).
For the theory of generalized Bernoulli polynomials associated to a periodic arithmetical function see [Cohen, Section 9.4].
The generalized Bernoulli polynomials may be used to evaluate twisted sums of k-th powers. For the present case the result is
sum{n = 0..4*N-1} X(n)*n^k = 1^k - 3^k + 5^k - 7^k + ... - (4*N-1)^k
= [B(X;k+1,4*N) - B(X;k+1,0)]/(k+1) = [W_k(0) - W_k(4*N)]/2.
For the proof apply [Cohen, Corollary 9.4.17 with m = 4 and x = 0].
The generalized Bernoulli polynomials and the Swiss-Knife polynomials are also related to infinite sums of powers through their Fourier series - see the formula section below. For a table of the coefficients of generalized Bernoulli polynomials attached to a Dirichlet character modulus 8 see A151751.
(End)
The Swiss-Knife polynomials provide a general formula for alternating sums of powers similar to the formula which are provided by the Bernoulli polynomials for non-alternating sums of powers (see the Luschny link). Sequences covered by this formula include A001057, A062393, A062392, A011934, A144129, A077221, A137501, A046092. - Peter Luschny, Jul 12 2009
The greatest common divisor of the nonzero coefficients of the decapitated Swiss-Knife polynomials is exp(Lambda(n)), where Lambda(n) is the von Mangoldt function for odd primes, symbolically:
gcd(coeffs(SKP_{n}(x) - x^n)) = A155457(n) (n>1). - Peter Luschny, Dec 16 2009
Another version is at A119879. - Philippe Deléham, Oct 26 2013

Examples

			1
x
x^2  -1
x^3  -3x
x^4  -6x^2   +5
x^5 -10x^3  +25x
x^6 -15x^4  +75x^2  -61
x^7 -21x^5 +175x^3 -427x
		

References

  • H. Cohen, Number Theory - Volume II: Analytic and Modern Tools, Graduate Texts in Mathematics. Springer-Verlag. [From Peter Bala, Jun 10 2009]

Crossrefs

W_n(k), k=0,1,...
W_0: 1, 1, 1, 1, 1, 1, ........ A000012
W_1: 0, 1, 2, 3, 4, 5, ........ A001477
W_2: -1, 0, 3, 8, 15, 24, ........ A067998
W_3: 0, -2, 2, 18, 52, 110, ........ A121670
W_4: 5, 0, -3, 32, 165, 480, ........
W_n(k), n=0,1,...
k=0: 1, 0, -1, 0, 5, 0, -61, ... A122045
k=1: 1, 1, 0, -2, 0, 16, 0, ... A155585
k=2: 1, 2, 3, 2, -3, 2, 63, ... A119880
k=3: 1, 3, 8, 18, 32, 48, 128, ... A119881
k=4: 1, 4, 15, 52, 165, 484, ........ [Peter Luschny, Jul 07 2009]

Programs

  • Maple
    w := proc(n,x) local v,k,pow,chen; pow := (a,b) -> if a = 0 and b = 0 then 1 else a^b fi; chen := proc(m) if irem(m+1,4) = 0 then RETURN(0) fi; 1/((-1)^iquo(m+1,4) *2^iquo(m,2)) end; add(add((-1)^v*binomial(k,v)*pow(v+x+1,n)*chen(k),v=0..k), k=0..n) end:
    # Coefficients with zeros:
    seq(print(seq(coeff(i!*coeff(series(exp(x*t)*sech(t),t,16),t,i),x,i-n),n=0..i)), i=0..8);
    # Recursion
    W := proc(n,z) option remember; local k,p;
    if n = 0 then 1 else p := irem(n+1,2);
    z^n - p + add(`if`(irem(k,2)=1,0,
    W(k,0)*binomial(n,k)*(power(z,n-k)-p)),k=2..n-1) fi end:
    # Peter Luschny, edited and additions Jul 07 2009, May 13 2010, Oct 24 2011
  • Mathematica
    max = 9; rows = (Reverse[ CoefficientList[ #, x]] & ) /@ CoefficientList[ Series[ Exp[x*t]*Sech[t], {t, 0, max}], t]*Range[0, max]!; par[coefs_] := (p = Partition[ coefs, 2][[All, 1]]; If[ EvenQ[ Length[ coefs]], p, Append[ p, Last[ coefs]]]); Flatten[ par /@ rows] (* Jean-François Alcover, Oct 03 2011, after g.f. *)
    sk[n_, x_] := Sum[Binomial[n, k]*EulerE[k]*x^(n-k), {k, 0, n}]; Table[CoefficientList[sk[n, x], x] // Reverse // Select[#, # =!= 0 &] &, {n, 0, 13}] // Flatten (* Jean-François Alcover, May 21 2013 *)
    Flatten@Table[Binomial[n, 2k] EulerE[2k], {n, 0, 12}, {k, 0, n/2}](* Oliver Seipel, Jan 14 2025 *)
  • Sage
    def A046978(k):
        if k % 4 == 0:
            return 0
        return (-1)**(k // 4)
    def A153641_poly(n, x):
        return expand(add(2**(-(k // 2))*A046978(k+1)*add((-1)**v*binomial(k,v)*(v+x+1)**n for v in (0..k)) for k in (0..n)))
    for n in (0..7): print(A153641_poly(n, x))  # Peter Luschny, Oct 24 2011

Formula

W_n(x) = Sum_{k=0..n}{v=0..k} (-1)^v binomial(k,v)*c_k*(x+v+1)^n where c_k = frac((-1)^(floor(k/4))/2^(floor(k/2))) [4 not div k] (Iverson notation).
From Peter Bala, Jun 10 2009: (Start)
E.g.f.: 2*exp(x*t)*(exp(t)-exp(3*t))/(1-exp(4*t))= 1 + x*t + (x^2-1)*t^2/2! + (x^3-3*x)*t^3/3! + ....
W_n(x) = 1/(2*n+2)*Sum_{k=0..n+1} 1/(k+1)*Sum_{i=0..k} (-1)^i*binomial(k,i)*((x+4*i+3)^(n+1) - (x+4*i+1)^(n+1)).
Fourier series expansion for the generalized Bernoulli polynomials:
B(X;2*n,x) = (-1)^n*(2/Pi)^(2*n)*(2*n)! * {sin(Pi*x/2)/1^(2*n) - sin(3*Pi*x/2)/3^(2*n) + sin(5*Pi*x/2)/5^(2*n) - ...}, valid for 0 <= x <= 1 when n >= 1.
B(X;2*n+1,x) = (-1)^(n+1)*(2/Pi)^(2*n+1)*(2*n+1)! * {cos(Pi*x/2)/1^(2*n+1) - cos(3*Pi*x/2)/3^(2*n+1) + cos(5*Pi*x/2)/5^(2*n+1) - ...}, valid for 0 <= x <= 1 when n >= 1 and for 0 <= x < 1 when n = 0.
(End)
E.g.f.: exp(x*t) * sech(t). - Peter Luschny, Jul 07 2009
O.g.f. as a J-fraction: z/(1-x*z+z^2/(1-x*z+4*z^2/(1-x*z+9*z^2/(1-x*z+...)))) = z + x*z^2 + (x^2-1)*z^3 + (x^3-3*x)*z^4 + .... - Peter Bala, Mar 11 2012
Conjectural o.g.f.: Sum_{n >= 0} (1/2^((n-1)/2))*cos((n+1)*Pi/4)*( Sum_{k = 0..n} (-1)^k*binomial(n,k)/(1 - (k + x)*t) ) = 1 + x*t + (x^2 - 1)*t^2 + (x^3 - 3*x)*t^3 + ... (checked up to O(t^13)), which leads to W_n(x) = Sum_{k = 0..n} 1/2^((k - 1)/2)*cos((k + 1)*Pi/4)*( Sum_{j = 0..k} (-1)^j*binomial(k, j)*(j + x)^n ). - Peter Bala, Oct 03 2016

A119879 Exponential Riordan array (sech(x),x).

Original entry on oeis.org

1, 0, 1, -1, 0, 1, 0, -3, 0, 1, 5, 0, -6, 0, 1, 0, 25, 0, -10, 0, 1, -61, 0, 75, 0, -15, 0, 1, 0, -427, 0, 175, 0, -21, 0, 1, 1385, 0, -1708, 0, 350, 0, -28, 0, 1, 0, 12465, 0, -5124, 0, 630, 0, -36, 0, 1, -50521, 0, 62325, 0, -12810, 0, 1050, 0, -45, 0, 1
Offset: 0

Views

Author

Paul Barry, May 26 2006

Keywords

Comments

Row sums have e.g.f. exp(x)*sech(x) (signed version of A009006). Inverse of masked Pascal triangle A119467. Transforms the sequence with e.g.f. g(x) to the sequence with e.g.f. g(x)*sech(x).
Coefficients of the Swiss-Knife polynomials for the computation of Euler, tangent and Bernoulli number (triangle read by rows). Another version in A153641. - Philippe Deléham, Oct 26 2013
Relations to Green functions and raising/creation and lowering/annihilation/destruction operators are presented in Hodges and Sukumar and in Copeland's discussion of this sequence and 2020 pdf. - Tom Copeland, Jul 24 2020

Examples

			Triangle begins:
     1;
     0,    1;
    -1,    0,     1;
     0,   -3,     0,   1;
     5,    0,    -6,   0,   1;
     0,   25,     0, -10,   0,   1;
   -61,    0,    75,   0, -15,   0,   1;
     0, -427,     0, 175,   0, -21,   0,  1;
  1385,    0, -1708,   0, 350,   0, -28,  0,  1;
		

Crossrefs

Row sums are A155585. - Johannes W. Meijer, Apr 20 2011
Rows reversed: A081658.

Programs

  • Maple
    T := (n,k) -> binomial(n,k)*2^(n-k)*euler(n-k,1/2): # Peter Luschny, Jan 25 2009
  • Mathematica
    T[n_, k_] := Binomial[n, k] 2^(n-k) EulerE[n-k, 1/2];
    Table[T[n, k], {n, 0, 10}, {k, 0, n}] // Flatten (* Jean-François Alcover, Jun 20 2018, after Peter Luschny *)
  • PARI
    {T(n,k) = binomial(n,k)*2^(n-k)*(2/(n-k+1))*(subst(bernpol(n-k+1, x), x, 1/2) - 2^(n-k+1)*subst(bernpol(n-k+1, x), x, 1/4))};
    for(n=0,5, for(k=0,n, print1(T(n,k), ", "))) \\ G. C. Greubel, Feb 25 2019
  • Sage
    @CachedFunction
    def A119879_poly(n, x) :
        return 1 if n == 0  else add(A119879_poly(k, 0)*binomial(n, k)*(x^(n-k)-1+n%2) for k in range(n)[::2])
    def A119879_row(n) :
        R = PolynomialRing(ZZ, 'x')
        return R(A119879_poly(n,x)).coeffs()  # Peter Luschny, Jul 16 2012
    # Alternatively:
    
  • Sage
    # uses[riordan_array from A256893]
    riordan_array(sech(x), x, 9, exp=true) # Peter Luschny, Apr 19 2015
    

Formula

Number triangle whose k-th column has e.g.f. sech(x)*x^k/k!.
T(n,k) = C(n,k)*2^(n-k)*E_{n-k}(1/2) where C(n,k) is the binomial coefficient and E_{m}(x) are the Euler polynomials. - Peter Luschny, Jan 25 2009
The coefficients in ascending order of x^i of the polynomials p{0}(x) = 1 and p{n}(x) = Sum_{k=0..n-1; k even} binomial(n,k)*p{k}(0)*((n mod 2) - 1 + x^(n-k)). - Peter Luschny, Jul 16 2012
E.g.f.: exp(x*z)/cosh(x). - Peter Luschny, Aug 01 2012
Sum_{k=0..n} T(n,k)*x^k = A122045(n), A155585(n), A119880(n), A119881(n) for x = 0, 1, 2, 3 respectively. - Philippe Deléham, Oct 27 2013
With all offsets 0, let A_n(x;y) = (y + E.(x))^n, an Appell sequence in y where E.(x)^k = E_k(x) are the Eulerian polynomials of A123125. Then the row polynomials of A046802 (the h-polynomials of the stellahedra) are given by h_n(x) = A_n(x;1); the row polynomials of A248727 (the face polynomials of the stellahedra), by f_n(x) = A_n(1 + x;1); the Swiss-knife polynomials of this entry, A119879, by Sw_n(x) = A_n(-1;1 + x); and the row polynomials of the Worpitsky triangle (A130850), by w_n(x) = A(1 + x;0). Other specializations of A_n(x;y) give A090582 (the f-polynomials of the permutohedra, cf. also A019538) and A028246 (another version of the Worpitsky triangle). - Tom Copeland, Jan 24 2020
Triangle equals P*((I + P^2)/2)^(-1), where P denotes Pascal's triangle A007318. - Peter Bala, Mar 07 2024

A059419 Triangle T(n,k) (1 <= k <= n) of tangent numbers, read by rows: T(n,k) = coefficient of x^n/n! in expansion of (tan x)^k/k!.

Original entry on oeis.org

1, 0, 1, 2, 0, 1, 0, 8, 0, 1, 16, 0, 20, 0, 1, 0, 136, 0, 40, 0, 1, 272, 0, 616, 0, 70, 0, 1, 0, 3968, 0, 2016, 0, 112, 0, 1, 7936, 0, 28160, 0, 5376, 0, 168, 0, 1, 0, 176896, 0, 135680, 0, 12432, 0, 240, 0, 1, 353792, 0, 1805056, 0, 508640, 0, 25872, 0, 330, 0, 1, 0
Offset: 1

Views

Author

N. J. A. Sloane, Jan 30 2001

Keywords

Comments

(tan(x))^k = sum{n>0, If n+k is odd, T(n,k) = 0 = n!/k!*(-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)*x^n}. - Vladimir Kruchinin, Aug 13 2012
Also the Bell transform of A009006(n+1). For the definition of the Bell transform see A264428. - Peter Luschny, Jan 26 2016

Examples

			     1;
     0,     1;
     2,     0,     1;
     0,     8,     0,    1;
    16,     0,    20,    0,    1;
     0,   136,     0,   40,    0,   1;
   272,     0,   616,    0,   70,   0,   1;
     0,  3968,     0, 2016,    0, 112,   0,  1;
  7936,     0, 28160,    0, 5376,   0, 168,  0,  1;
		

References

  • L. Comtet, Advanced Combinatorics, Reidel, 1974, p. 259.

Crossrefs

Diagonals give A000182, A024283, A059420 (interspersed with 0's), also A007290, A059421. Row sums give A006229. Essentially the same triangle as A008308.
A111593 (signed triangle with extra column k=0 and row n=0).

Programs

  • Maple
    A059419 := proc(n,k) option remember; if n = k then 1; elif k <0 or k > n then 0; else  procname(n-1,k-1)+k*(k+1)*procname(n-1,k+1) ; end if; end proc: # R. J. Mathar, Feb 11 2011
    # The function BellMatrix is defined in A264428.
    # Adds (1, 0, 0, 0, ..) as column 0.
    BellMatrix(n -> 2^(n+1)*abs(euler(n+1, 1)), 10); # Peter Luschny, Jan 26 2016
  • Mathematica
    d[f_ ] := (1+x^2)*D[f, x]; d[ f_, n_] := Nest[d, f, n]; row[n_] := Rest[ CoefficientList[ d[Exp[x*t], n] /. x -> 0, t]]; Flatten[ Table[ row[n], {n, 1, 12}]] (* Jean-François Alcover, Dec 21 2011, after Peter Bala *)
    rows = 12;
    t = Table[2^(n+1)*Abs[EulerE[n+1, 1]], {n, 0, rows}];
    T[n_, k_] := BellY[n, k, t];
    Table[T[n, k], {n, 1, rows}, {k, 1, n}] // Flatten (* Jean-François Alcover, Jun 22 2018, after Peter Luschny *)
  • PARI
    T(n,k)=if(k<1 || k>n,0,n!*polcoeff(tan(x+x*O(x^n))^k/k!,n))
    
  • Sage
    def A059419_triangle(dim):
        M = matrix(ZZ, dim, dim)
        for n in (0..dim-1): M[n,n] = 1
        for n in (1..dim-1):
            for k in (0..n-1):
                M[n,k] = M[n-1,k-1]+(k+1)*(k+2)*M[n-1,k+1]
        return M
    A059419_triangle(9) # Peter Luschny, Sep 19 2012

Formula

T(n+1, k) = T(n, k-1) + k*(k+1)*T(n, k+1), T(n, n) = 1.
If n+k is odd, T(n,k) = 0 = 1/k!*(-1)^((n+k)/2)*Sum_{j=k..n} j!* Stirling2(n,j)*2^(n-j)*(-1)^(n+j-k)*binomial(j-1,k-1). - Vladimir Kruchinin, Feb 10 2011
E.g.f.: exp(t*tan(x))-1 = t*x + t^2*x^2/2! + (2*t + t^3)*x^3/3! + ....
The row polynomials are given by D^n(exp(x*t)) evaluated at x = 0, where D is the operator (1+x^2)*d/dx. - Peter Bala, Nov 25 2011
The o.g.f.s of the diagonals of this triangle are rational functions obtained from the series reversion (x-t*tan(x))^(-1) = x/(1-t) + 2*t/(1-t)^4*x^3/3! + 8*t*(2+3*t)/(1-t)^7*x^5/5! + 16*t*(17+78*t+45*t^2)/(1-t)^10*x^7/7! + .... For example, the fourth subdiagonal has o.g.f. 8*t*(2+3*t)/(1-t)^7 = 16*t + 136*t^2 + 616*t^3 + .... - Peter Bala, Apr 23 2012
With offset 0 and initial column of zeros, except for T(0,0) = 1, e.g.f.(t,x) = e^(x*tan(t)) = e^(P(.,x)t) ; the lowering operator, L = atan(d/dx) ; and the raising operator, R = x [1 +(d/dx)^2], where L P(n,x) = n P(n-1,x) and R P(n,x) = P(n+1,x). The sequence is a binomial Sheffer sequence. - Tom Copeland, Oct 01 2015

Extensions

More terms from Larry Reeves (larryr(AT)acm.org), Feb 01 2001

A209849 Triangle read by rows: coefficients of polynomials in Sum_{k = 0..t} k^n * binomial(t,k).

Original entry on oeis.org

1, 1, 1, 0, 3, 1, -2, 3, 6, 1, 0, -10, 15, 10, 1, 16, -30, -15, 45, 15, 1, 0, 112, -210, 35, 105, 21, 1, -272, 588, 28, -735, 280, 210, 28, 1, 0, -2448, 5292, -2436, -1575, 1008, 378, 36, 1, 7936, -18960, 4140, 20160, -14595, -1575, 2730, 630, 45, 1
Offset: 1

Views

Author

Peter Bala, Mar 15 2012

Keywords

Comments

Repeatedly applying the operator x*d/dx to (1 + x)^t (t a nonnegative integer) and evaluating at x = 1 yields Sum_{k = 0..t} k^n*binomial(t,k) = R(n,t)*2^(t-n), where R(n,t) is a polynomial in t for n = 1,2,.... The polynomial sequence {R(n,t)}_{n>=0} is of binomial type. The first few values are given in the example section below.
This triangle lists the coefficients of these polynomials in ascending powers of t (omitting R(0,t) = 1). A closely related triangle is A102573, which lists the coefficients of the polynomials R(n,t) after factors of t and t*(1 + t) have been removed.
This is the case m = 2 of a family of binomial type polynomials satisfying the recurrence R(n+1,t) = t*(m*(R(n,t) - R(n,t-1)) + R(n,t-1)) with R(0,t) = 1. Case m = 0 gives the falling factorials (A008275); Case m = -1 gives a signed version of A079641.

Examples

			Repeatedly applying the operator x*d/dx to (1 + x)^n and evaluating the result at x = 1 yields
Sum_{k = 0..n} k   * binomial(n,k) =  n                * 2^(n-1).
Sum_{k = 0..n} k^2 * binomial(n,k) = (n +   n^2)       * 2^(n-2).
Sum_{k = 0..n} k^3 * binomial(n,k) = (    3*n^2 + n^3) * 2^(n-3).
Triangle begins:
  n\k|    1     2     3     4     5     6     7     8
  = = = = = = = = = = = = = = = = = = = = = = = = = =
  1  |    1
  2  |    1     1
  3  |    0     3     1
  4  |   -2     3     6     1
  5  |    0   -10    15    10     1
  6  |   16   -30   -15    45    15     1
  7  |    0   112  -210    35   105    21     1
  8  | -272   588    28  -735   280   210    28     1
  ...
		

Crossrefs

Columns k=1..3 give A155585(n-1), A383165, A383166.

Programs

  • Maple
    # The function BellMatrix is defined in A264428.
    g := n -> 2^n*euler(n,1): BellMatrix(g, 9); # Peter Luschny, Jan 21 2016
  • Mathematica
    BellMatrix[f_Function, len_] := With[{t = Array[f, len, 0]}, Table[BellY[n, k, t], {n, 0, len - 1}, {k, 0, len - 1}]];
    rows = 12;
    M = BellMatrix[2^# EulerE[#, 1]&, rows];
    Table[M[[n, k]], {n, 2, rows}, {k, 2, n}] // Flatten (* Jean-François Alcover, Jun 24 2018, after Peter Luschny *)
  • PARI
    T(n, k) = sum(j=k, n, 2^(n-j)*stirling(n, j, 2)*stirling(j, k, 1)); \\ Seiichi Manyama, Apr 16 2025
  • Sage
    # uses[bell_matrix from A264428]
    g = lambda n: sum((-2)^(n-k)*factorial(k)*stirling_number2(n,k) for k in (0..n))
    bell_matrix(g, 9) # Peter Luschny, Jan 21 2016
    
  • Sage
    def a_row(n):
        s = sum(2^(n-k)*stirling_number2(n, k)*falling_factorial(x, k) for k in (0..n))
        return expand(s).list()[1:]
    for n in (1..10): print(a_row(n)) # Seiichi Manyama, Apr 16 2025
    

Formula

T(n,k) = Sum_{j = 0..n} (-1)^(n+k) * (-2)^(n-j) * Stirling2(n,j) * |Stirling1(j,k)|. [corrected by Seiichi Manyama, Apr 16 2025]
E.g.f.: F(x,t) := (1/2 + 1/2*exp(2*x))^t = (1 + tanh(-x))^(-t) = 1 + t*x + (t+t^2)*x^2/2! + (3*t^2+t^3)*x^3/3! + ... satisfies the delay differential equation d/dx(F(x,t)) = 2*F(x,t) - F(x,t-1).
Recurrence for row polynomials R(n,t): R(n+1,t) = t*(2*R(n,t) - R(n,t-1)) with R(0,t) = 1.
Let D be the backward difference operator D(f(x)) = f(x) - f(x-1). Then (x*D)^n(2^x) = 2^(x-n)*R(n,x). Cf. A079641.
Discrete Dobinski-type relation: R(n,x) = 1/2^x*Sum_{k = 0..inf} (2*k)^n*x*(x - 1)*...*(x - k + 1)/k!, valid for x = 0,1,2,.... and n >= 1.
Other Dobinski-type relations: exp(-x)*Sum_{k = 0..inf} R(n,k)*x^k/k! = n-th row polynomial of A075497.
exp(-x)*Sum_{k = 0..inf} R(n,k+1)*x^k/k! = n-th row polynomial of A154602.
i^(-n)*exp(i*x)*Sum_{k = 0..inf} R(n,-k)*(-i*x)^k/k! = n-th row polynomial of A059419 where i = sqrt(-1).
Writing x^[n] in place of R(n,x) we have the analog of the Bernoulli summation formula for powers of integers: Sum_{k = 1..n-1} k^[p] = 1/(p + 1)*Sum_{k = 0..p} 2^k*binomial(p+1,k)*B_k*n^[p+1-k], where B_k = [1,-1/2,1/6,0,-1/30,...] is the sequence of Bernoulli numbers.
n-th row sum R(n,1) equals 2^(n-1). Alternating row sums R(n,-1) starting [-1,0,2,0,-16,0,272,...] are signed tangent numbers - see A009006 and A155585.
R(n+1,2) = 2^n + 4^n = A063376(n).
Triangle as a product of lower triangular arrays equals A075497*A008275.
The triangle of connection constants between the polynomials (x + 1)^[n] and x^[n] appears to be A119468 = (P^2 + 1)/2, where P denotes Pascal's triangle.
Also the Bell transform of the sequence 2^n*E(n,1), E(n,x) the Euler polynomials (A155585). For the definition of the Bell transform see A264428. - Peter Luschny, Jan 21 2016
From Peter Bala, Jun 26 2016: (Start)
With row and column numbering starting at 0:
E.g.f. is exp(x)/cosh(x)*((1 + exp(2*x))/2)^t = 1 + (1 + t)*x + (3*t + t^2)*x^2/2! + (-2 + 3*t + 6*t^2 + t^3)*x^3/3! + ....
Exponential Riordan array [d/dx(f(x)), f(x)] belonging to the Derivative subgroup of the Riordan group, where f(x) = log((1 + exp(2*x))/2) and df/dx = exp(x)/cosh(x) is the e.g.f. for A155585. (End)
T(n,k) = [x^k] Sum_{k=0..n} 2^(n-k) * Stirling2(n,k) * FallingFactorial(x,k). - Seiichi Manyama, Apr 16 2025
E.g.f. of column k (with leading zeros): f(x)^k / k! with f(x) = log(1 + (exp(2*x) - 1)/2). - Seiichi Manyama, Apr 18 2025

A062869 Triangle read by rows: For n >= 0, k >= 0, T(n,k) is the number of permutations pi of n such that the total distance Sum_i abs(i-pi(i)) = 2k. Equivalently, k = Sum_i max(i-pi(i),0).

Original entry on oeis.org

1, 1, 1, 1, 1, 2, 3, 1, 3, 7, 9, 4, 1, 4, 12, 24, 35, 24, 20, 1, 5, 18, 46, 93, 137, 148, 136, 100, 36, 1, 6, 25, 76, 187, 366, 591, 744, 884, 832, 716, 360, 252, 1, 7, 33, 115, 327, 765, 1523, 2553, 3696, 4852, 5708, 5892, 5452, 4212, 2844, 1764, 576, 1, 8, 42, 164, 524
Offset: 0

Views

Author

Olivier Gérard, Jun 26 2001

Keywords

Comments

Number of possible values is 1,2,3,5,7,10,13,17,21,... = A033638. Maximum distance divided by 2 is the same minus one, i.e., 0,1,2,4,6,9,12,16,20,... = A002620.
T. Kyle Petersen and Bridget Eileen Tenner proved that T(n,k) is also the number of permutations of n for which the sum of descent differences equals k. - Susanne Wienand, Sep 11 2014

Examples

			Triangle T(n,k) begins:
  1;
  1;
  1, 1;
  1, 2,  3;
  1, 3,  7,  9,   4;
  1, 4, 12, 24,  35,  24,  20;
  1, 5, 18, 46,  93, 137, 148, 136, 100,  36;
  1, 6, 25, 76, 187, 366, 591, 744, 884, 832, 716, 360, 252;
  ...
(4,3,1,2) has distances (3,1,2,2), sum is 8 and there are 3 other permutations of degree 4 with this sum.
		

References

  • D. E. Knuth, The Art of Computer Programming, vol. 3, (1998), page 22 (exercise 28) and page 597 (solution and comments).

Crossrefs

Row sums give A000142.
T(2n,n) gives A072948.
A357329 is a sub-triangle.

Programs

  • Maple
    # The following program yields the entries of the specified row n
    n := 9: with(combinat): P := permute(n): excsum := proc (p) (1/2)*add(abs(p[i]-i), i = 1 .. nops(p)) end proc: f[n] := sort(add(t^excsum(P[j]), j = 1 .. factorial(n))): seq(coeff(f[n], t, j), j = 0 .. floor((1/4)*n^2)); # Emeric Deutsch, Apr 02 2010
    # Maple program using the g.f. given by Guay-Paquey and Petersen:
    g:= proc(h, n) local i, j; j:= irem(h, 2, 'i');
           1-`if`(h=n, 0, (i+1)*z*t^(i+j)/g(h+1, n))
        end:
    T:= n-> (p-> seq(coeff(p, t, k), k=0..degree(p)))
            (coeff(series(1/g(0, n), z, n+1), z, n)):
    seq(T(n), n=0..10);  # Alois P. Heinz, May 02 2014
  • Mathematica
    g[h_, n_] := Module[{i, j}, {i, j} = QuotientRemainder[h, 2]; 1 - If[h == n, 0, (i + 1)*z*t^(i + j)/g[h + 1, n]]]; T[n_] := Function[p, Table[ Coefficient[p, t, k], {k, 0, Exponent[p, t]}]][SeriesCoefficient[ 1/g[0, n], {z, 0, n}]]; Table[T[n], {n, 1, 10}] // Flatten (* Jean-François Alcover, Jan 07 2016, after Alois P. Heinz *)
    f[i_] := If[i == 1, 1, -(i-1)^2 t^(2i - 3) z^2];
    g[i_] := 1 - (2i - 1) t^(i-1) z;
    cf = ContinuedFractionK[f[i], g[i], {i, 1, 5}];
    CoefficientList[#, t]& /@ CoefficientList[cf + O[z]^10, z] // Rest // Flatten (* Jean-François Alcover, Nov 25 2018, after Mathieu Guay-Paquet *)
  • Sage
    # The following Sage program
    # yields the entries of the first n rows
    # as a list of lists
    def get_first_rows(n):
        R, t = PolynomialRing(ZZ, 't').objgen()
        S, z = PowerSeriesRing(R, 'z').objgen()
        gf = S(1).add_bigoh(1)
        for i in srange(n, 0, -1):
            a = (i+1) // 2
            b = i // 2
            gf = 1 / (1 - a * t^b * z * gf)
        return [list(row) for row in gf.shift(-1)]
    # Mathieu Guay-Paquet, Apr 30 2014

Formula

From Mathieu Guay-Paquet, Apr 30 2014: (Start)
G.f.: 1/(1-z/(1-t*z/(1-2*t*z/(1-2*t^2*z/(1-3*t^2*z/(1-3*t^3*z/(1-4*t^3*z/(1-4*t^4*z/(...
This is a continued fraction where the (2i)th numerator is (i+1)*t^i*z, and the (2i+1)st numerator is (i+1)*t^(i+1)*z for i >= 0. The coefficient of z^n gives row n, n >= 1, and the coefficient of t^k gives column k, k >= 0. (End)
From Alois P. Heinz, Oct 02 2022: (Start)
Sum_{k=0..floor(n^2/4)} k * T(n,k) = A005990(n).
Sum_{k=0..floor(n^2/4)} (-1)^k * T(n,k) = A009006(n). (End).

Extensions

T(0,0)=1 prepended by Alois P. Heinz, Oct 03 2022

A353611 Product_{n>=1} (1 + a(n)*x^n/n!) = 1 + tan(x).

Original entry on oeis.org

1, 0, 2, -8, 56, -336, 3184, -27264, 309760, -3297280, 48104704, -624745472, 10591523840, -159594803200, 3133776259072, -56224864108544, 1249919350046720, -24600643845095424, 624022403933077504, -14094091678163140608, 381632216575339397120, -9516741266133420605440
Offset: 1

Views

Author

Ilya Gutkovskiy, May 07 2022

Keywords

Crossrefs

Programs

  • Mathematica
    nn = 22; f[x_] := Product[(1 + a[n] x^n/n!), {n, 1, nn}]; sol = SolveAlways[0 == Series[f[x] - 1 - Tan[x], {x, 0, nn}], x]; Table[a[n], {n, 1, nn}] /. sol // Flatten

A081658 Triangle read by rows: T(n, k) = (-2)^k*binomial(n, k)*Euler(k, 1/2).

Original entry on oeis.org

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

Views

Author

Paul Barry, Mar 26 2003

Keywords

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)
		

Crossrefs

Row reversed: A119879.

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).
Row sum: A155585 (cf. A009006). Absolute row sum: A003701.
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
Showing 1-10 of 25 results. Next