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

A157308 G.f. A(x) satisfies the condition that both A(x) and F(x) = A(x*F(x)) = g.f. of A155585 have zeros for every other coefficient after initial terms; g.f. of dual sequence A157309 satisfies the same condition.

Original entry on oeis.org

1, 1, -1, 0, 3, 0, -38, 0, 947, 0, -37394, 0, 2120190, 0, -162980012, 0, 16330173251, 0, -2070201641498, 0, 324240251016266, 0, -61525045423103316, 0, 13913915097436287598, 0, -3698477457114061621492, 0
Offset: 0

Views

Author

Paul D. Hanna, Mar 11 2009

Keywords

Comments

After initial 2 terms, reversing signs yields A157310.
Conjecture: a(m) == 1 (mod 2) iff m is a power of 2 or m=0. [Paul D. Hanna, Mar 17 2009]

Examples

			G.f.: A(x) = 1 + x - x^2 + 3*x^4 - 38*x^6 + 947*x^8 - 37394*x^10 +-...
RELATED FUNCTIONS.
If F(x) = A(x*F(x)) then F(x) = o.g.f. of A155585:
A155585 = [1,1,0,-2,0,16,0,-272,0,7936,0,-353792,0,...];
...
If G(x) = A(x*G(x))/(1+x) then G(x) = o.g.f. of A122045:
A122045 = [1,0,-1,0,5,0,-61,0,1385,0,-50521,0,2702765,0,...];
...
		

Crossrefs

Cf. A157309, A157310, A157304, A157305, A155585, A122045 (Euler numbers).
Cf. A158119. [Paul D. Hanna, Mar 17 2009]

Programs

  • Mathematica
    terms = 28;
    F[x_] = Sum[n! x^n/Product[(1 + 2k x), {k, 1, n}], {n, 0, terms+1}] + O[x]^(terms+1);
    A[x_] = x/InverseSeries[x F[x]];
    CoefficientList[A[x], x][[1 ;; terms]] (* Jean-François Alcover, Jul 26 2018 *)
  • PARI
    {a(n)=local(A=[1, 1]); for(i=1, n, if(#A%2==0, A=concat(A, 0);); if(#A%2==1, A=concat(A, t); A[ #A]=-subst(Vec(x/serreverse(x*Ser(A)))[ #A], t, 0))); Vec(x/serreverse(x*Ser(A)))[n+1]}

Formula

Let F(x) = o.g.f. of A155585, then o.g.f. A(x) satisfies:
A(x) = x/serreverse(x*F(x));
A(x) = 2x + F( -x/(A(x) - 2x) );
A(x) = F(x/A(x));
F(x) = A(x*F(x));
where A155585 is defined by e.g.f. exp(x)/cosh(x).
...
Let G(x) = o.g.f. of A122045, then o.g.f. A(x) satisfies:
A(x) = x + x/serreverse(x*G(x));
A(x) = x + G( x/(A(x) - x) );
G(x) = A(x*G(x))/(1+x);
where A122045 is the Euler numbers.
...
O.g.f.: A(x) = 2*(1+x) - H(x) where H(x) = g.f. of A157310.

A157310 G.f. A(x) satisfies the condition that both A(x) and F(x) = A(x/F(x)) = o.g.f. of A157309 have zeros for every other coefficient after initial terms; g.f. of dual sequence A155585 satisfies the same condition.

Original entry on oeis.org

1, 1, 1, 0, -3, 0, 38, 0, -947, 0, 37394, 0, -2120190, 0, 162980012, 0, -16330173251, 0, 2070201641498, 0, -324240251016266, 0, 61525045423103316, 0, -13913915097436287598, 0, 3698477457114061621492, 0
Offset: 0

Views

Author

Paul D. Hanna, Mar 11 2009

Keywords

Comments

After initial 2 terms, reversing signs yields A157308.

Examples

			G.f.: A(x) = 1 + x + x^2 - 3*x^4 + 38*x^6 - 947*x^8 + 37394*x^10 -+...
RELATED FUNCTIONS.
If F(x) = A(x/F(x)) then F(x) = o.g.f. of A157309:
A157309 = [1,1,0,-1,0,9,0,-176,0,5693,0,-272185,0,...];
...
If G(x) = (2 - A(x*G(x)))/(1-x) then G(x) = o.g.f. of A122045:
A122045 = [1,0,-1,0,5,0,-61,0,1385,0,-50521,0,2702765,0,...];
...
Let H(x) = A(x*H(-x)) = o.g.f. of A155585:
A155585 = [1,1,0,-2,0,16,0,-272,0,7936,0,-353792,0,...];
...
		

Crossrefs

Cf. A157308, A157309, A155585, A157304, A157305, A122045 (Euler numbers).

Programs

  • PARI
    {a(n)=local(A=[1, 1]); for(i=1, n, if(#A%2==1, A=concat(A, 0);); if(#A%2==0, A=concat(A, t); A[ #A]=-subst(Vec(x/serreverse(x*Ser(A)))[ #A], t, 0))); A[n+1]}

Formula

Let F(x) = A(x/F(x)) = o.g.f. of A157309, then F(x) satisfies:
A(x) = Series_Reversion(x/F(x))/x;
A(x) = F(x*A(x));
F(x) = A(x/F(x));
where A157309 has zeros for every other term after initial [1,1].
...
Let G(x) = o.g.f. of A122045, then o.g.f. A(x) satisfies:
A(x) = 2+x - x/Series_Reversion(x*G(x));
A(x) = 2+x - G( x/(2+x - A(x)) );
G(x) = (2 - A(x*G(x)))/(1-x);
where A122045 is the Euler numbers.
...
Let H(x) = o.g.f. of A155585, then o.g.f. A(x) satisfies:
A(x) = 2(1+x) - x/Series_Reversion(x*H(x));
A(x) = 2 - H( -x/(2 - A(x)) );
A(x) = H(-x/A(x));
H(x) = A(x*H(-x));
where A155585 is defined by e.g.f. exp(x)/cosh(x).
...
O.g.f.: A(x) = 2*(1+x) - B(x) where B(x) = g.f. of A157308.

A167532 G.f.: Sum_{n>=0} A155585(n)^2 * log(1/(1-2*x))^n/n!, where 1/(1-2*x+2*x^2) = Sum_{n>=0} A155585(n)*log(1/(1-2*x))^n/n!.

Original entry on oeis.org

1, 2, 2, 8, 20, 112, 432, 3200, 16704, 154688, 1017920, 11333888, 90011264, 1172330496, 10908526592, 162802835456, 1737036006400, 29235365490688, 351847501606912, 6593866787569664, 88364197074231296, 1825016315965767680
Offset: 0

Views

Author

Paul D. Hanna, Nov 05 2009

Keywords

Comments

Note that A155585(n) = 2^n E_{n}(1) where E_{n}(x) are the Euler polynomials; e.g.f. of A155585 is exp(x)/cosh(x).
CONJECTURE: For all integer m>0, Sum_{n>=0} L(n)^m * log(1+x)^n/n! is an integer series whenever Sum_{n>=0} L(n)*log(1+x)^n/n! is an integer series.

Examples

			G.f.: A(x) = 1 + 2*x + 2*x^2 + 8*x^3 + 20*x^4 + 112*x^5 + 432*x^6 +...
Illustrate A(x) = Sum_{n>=0} A155585(n)^2*log(1/(1-2*x))^n/n!:
A(x) = 1 - log(1-2*x) - 2^2*log(1-2*x)^3/3! - 16^2*log(1-2*x)^5/5! - 272^2*log(1-2*x)^7/7! - 7936^2*log(1-2*x)^9/9! +...+ A155585(n)^2*[ -log(1-2x)]^n/n! +...
where:
1/((1-x)^2 + x^2) = 1 - log(1-2*x) + 2*log(1-2*x)^3/3! - 16*log(1-2*x)^5/5! + 272*log(1-2*x)^7/7! - 7936*log(1-2*x)^9/9! +...+ A155585(n)*[ -log(1-2x)]^n/n! +...
		

Crossrefs

Programs

  • PARI
    {A155585(n)=if(n==0,1,bernfrac(n+1)*(2^(n+1)-1)*2^(n+1)/(n+1))}
    {a(n)=polcoeff(sum(k=0,n,A155585(k)^2*log(1/(1-2*x +x*O(x^n)))^k/k!),n)}

A167540 G.f.: Sum_{n>=0} A155585(2n+1)*log(1-2x)^n/n!, where (1-2*x)^2/(1-2*x+2*x^2) = Sum_{n>=0} A155585(n)*log(1-2x)^n/n!.

Original entry on oeis.org

1, 4, 36, 432, 6504, 118272, 2525824, 62011648, 1721422656, 53324108032, 1823657963776, 68252530738176, 2774853481548288, 121780933815238656, 5738394351838543872, 288958047466769973248, 15485497781445500923904
Offset: 0

Views

Author

Paul D. Hanna, Nov 06 2009

Keywords

Comments

Note that A155585(n) = 2^n E_{n}(1) where E_{n}(x) are the Euler polynomials; e.g.f. of A155585 is exp(x)/cosh(x).
CONJECTURE: For integers m>0, b>=0, Sum_{n>=0} L(m*n+b) * log(1+x)^n/n! is an integer series whenever Sum_{n>=0} L(n)*log(1+x)^n/n! is an integer series.

Examples

			G.f.: A(x) = 1 + 4*x + 36*x^2 + 432*x^3 + 6504*x^4 + 118272*x^5 +...
Illustrate the g.f.:
A(x) = 1 - 2*log(1-2*x) + 16*log(1-2*x)^2/2! - 272*log(1-2*x)^3/3! + 7936*log(1-2*x)^4/4! - 353792*log(1-2*x)^5/5! +...+ A155585(2n+1)*log(1-2x)^n/n! +...
where:
(1-2*x)^2/(1-2*x+2*x^2) = 1 + log(1-2*x) - 2*log(1-2*x)^3/3! + 16*log(1-2*x)^5/5! - 272*log(1-2*x)^7/7! +...+ A155585(n)*log(1-2x)^n/n! +...
		

Crossrefs

Cf. A155585, variant: A167532.

Programs

  • PARI
    {A155585(n)=if(n==0,1,bernfrac(n+1)*(2^(n+1)-1)*2^(n+1)/(n+1))}
    {a(n)=polcoeff(sum(k=0,n,A155585(2*k+1)*log(1-2*x +x*O(x^n))^k/k!),n)}

A027641 Numerator of Bernoulli number B_n.

Original entry on oeis.org

1, -1, 1, 0, -1, 0, 1, 0, -1, 0, 5, 0, -691, 0, 7, 0, -3617, 0, 43867, 0, -174611, 0, 854513, 0, -236364091, 0, 8553103, 0, -23749461029, 0, 8615841276005, 0, -7709321041217, 0, 2577687858367, 0, -26315271553053477373, 0, 2929993913841559, 0, -261082718496449122051
Offset: 0

Views

Author

Keywords

Comments

a(n)/A027642(n) (Bernoulli numbers) provide the a-sequence for the Sheffer matrix A094816 (coefficients of orthogonal Poisson-Charlier polynomials). See the W. Lang link under A006232 for a- and z-sequences for Sheffer matrices. The corresponding z-sequence is given by the rationals A130189(n)/A130190(n).
Harvey (2008) describes a new algorithm for computing Bernoulli numbers. His method is to compute B(k) modulo p for many small primes p and then reconstruct B(k) via the Chinese Remainder Theorem. The time complexity is O(k^2 log(k)^(2+eps)). The algorithm is especially well-suited to parallelization. - Jonathan Vos Post, Jul 09 2008
Regard the Bernoulli numbers as forming a vector = B_n, and the variant starting (1, 1/2, 1/6, 0, -1/30, ...), (i.e., the first 1/2 has sign +) as forming a vector Bv_n. The relationship between the Pascal triangle matrix, B_n, and Bv_n is as follows: The binomial transform of B_n = Bv_n. B_n is unchanged when multiplied by the Pascal matrix with rows signed (+-+-, ...), i.e., (1; -1,-1; 1,2,1; ...). Bv_n is unchanged when multiplied by the Pascal matrix with columns signed (+-+-, ...), i.e., (1; 1,-1; 1,-2,1; 1,-3,3,-1; ...). - Gary W. Adamson, Jun 29 2012
The sequence of the Bernoulli numbers B_n = a(n)/A027642(n) is the inverse binomial transform of the sequence {A164555(n)/A027642(n)}, illustrated by the fact that they appear as top row and left column in A190339. - Paul Curtz, May 13 2016
Named by de Moivre (1773; "the numbers of Mr. James Bernoulli") after the Swiss mathematician Jacob Bernoulli (1655-1705). - Amiram Eldar, Oct 02 2023

Examples

			B_n sequence begins 1, -1/2, 1/6, 0, -1/30, 0, 1/42, 0, -1/30, 0, 5/66, 0, -691/2730, 0, 7/6, 0, -3617/510, ...
		

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.
  • Louis Comtet, Advanced Combinatorics, Reidel, 1974, p. 49.
  • Harold T. Davis, Tables of the Mathematical Functions. Vols. 1 and 2, 2nd ed., 1963, Vol. 3 (with V. J. Fisher), 1962; Principia Press of Trinity Univ., San Antonio, TX, Vol. 2, p. 230.
  • Harold M. Edwards, Riemann's Zeta Function, Academic Press, NY, 1974; see p. 11.
  • Steven R. Finch, Mathematical Constants, Cambridge, 2003, Section 1.6.1.
  • Herman H. Goldstine, A History of Numerical Analysis, Springer-Verlag, 1977; Section 2.6.
  • L. M. Milne-Thompson, Calculus of Finite Differences, 1951, p. 137.
  • Hans Rademacher, Topics in Analytic Number Theory, Springer, 1973, Chap. 1.

Crossrefs

This is the main entry for the Bernoulli numbers and has all the references, links and formulas. Sequences A027642 (the denominators of B_n) and A000367/A002445 = B_{2n} are also important!
A refinement is A194587.

Programs

  • Magma
    [Numerator(Bernoulli(n)): n in [0..40]]; // Vincenzo Librandi, Mar 17 2014
    
  • Maple
    B := n -> add((-1)^m*m!*Stirling2(n, m)/(m+1), m=0..n);
    B := n -> bernoulli(n);
    seq(numer(bernoulli(n)), n=0..40); # Zerinvary Lajos, Apr 08 2009
  • Mathematica
    Table[ Numerator[ BernoulliB[ n]], {n, 0, 40}] (* Robert G. Wilson v, Oct 11 2004 *)
    Numerator[ Range[0, 40]! CoefficientList[ Series[x/(E^x - 1), {x, 0, 40}], x]]
    Numerator[CoefficientList[Series[PolyGamma[1, 1/x]/x - x, {x, 0, 40}, Assumptions -> x > 0], x]] (* Vladimir Reshetnikov, Apr 24 2013 *)
  • Maxima
    B(n):=(-1)^((n))*sum((stirling1(n,k)*stirling2(n+k,n))/binomial(n+k,k),k,0,n);
    makelist(num(B(n)),n,0,20); /* Vladimir Kruchinin, Mar 16 2013 */
    
  • PARI
    a(n)=numerator(bernfrac(n))
    
  • Python
    from sympy import bernoulli
    from fractions import Fraction
    [bernoulli(i).as_numer_denom()[0] for i in range(51)]  # Indranil Ghosh, Mar 18 2017
    
  • Python
    from sympy import bernoulli
    def A027641(n): return bernoulli(n).p
    print([A027641(n) for n in range(80)])  # M. F. Hasler, Jun 11 2019
  • SageMath
    [bernoulli(n).numerator() for n in range(41)]  # Peter Luschny, Feb 19 2016
    
  • SageMath
    # Alternatively:
    def A027641_list(len):
        f, R, C = 1, [1], [1]+[0]*(len-1)
        for n in (1..len-1):
            f *= n
            for k in range(n, 0, -1):
                C[k] = C[k-1] / (k+1)
            C[0] = -sum(C[k] for k in (1..n))
            R.append((C[0]*f).numerator())
        return R
    A027641_list(41)  # Peter Luschny, Feb 20 2016
    

Formula

E.g.f: x/(exp(x) - 1); take numerators.
Recurrence: B^n = (1+B)^n, n >= 2 (interpreting B^j as B_j).
B_{2n}/(2n)! = 2*(-1)^(n-1)*(2*Pi)^(-2n) Sum_{k>=1} 1/k^(2n) (gives asymptotics) - Rademacher, p. 16, Eq. (9.1). In particular, B_{2*n} ~ (-1)^(n-1)*2*(2*n)!/(2*Pi)^(2*n).
Sum_{i=1..n-1} i^k = ((n+B)^(k+1)-B^(k+1))/(k+1) (interpreting B^j as B_j).
B_{n-1} = - Sum_{r=1..n} (-1)^r binomial(n, r) r^(-1) Sum_{k=1..r} k^(n-1). More concisely, B_n = 1 - (1-C)^(n+1), where C^r is replaced by the arithmetic mean of the first r n-th powers of natural numbers in the expansion of the right-hand side. [Bergmann]
Sum_{i>=1} 1/i^(2k) = zeta(2k) = (2*Pi)^(2k)*|B_{2k}|/(2*(2k)!).
B_{2n} = (-1)^(m-1)/2^(2m+1) * Integral{-inf..inf, [d^(m-1)/dx^(m-1) sech(x)^2 ]^2 dx} (see Grosset/Veselov).
Let B(s,z) = -2^(1-s)(i/Pi)^s s! PolyLog(s,exp(-2*i*Pi/z)). Then B(2n,1) = B_{2n} for n >= 1. Similarly the numbers B(2n+1,1), which might be called Co-Bernoulli numbers, can be considered, and it is remarkable that Leonhard Euler in 1755 already calculated B(3,1) and B(5,1) (Opera Omnia, Ser. 1, Vol. 10, p. 351). (Cf. the Luschny reference for a discussion.) - Peter Luschny, May 02 2009
The B_n sequence is the left column of the inverse of triangle A074909, the "beheaded" Pascal's triangle. - Gary W. Adamson, Mar 05 2012
From Sergei N. Gladkovskii, Dec 04 2012: (Start)
E.g.f. E(x)= 2 - x/(tan(x) + sec(x) - 1)= Sum_{n>=0} a(n)*x^n/n!, a(n)=|B(n)|, where B(n) is Bernoulli number B_n.
E(x)= 2 + x - B(0), where B(k)= 4*k+1 + x/(2 + x/(4*k+3 - x/(2 - x/B(k+1)))); (continued fraction, 4-step). (End)
E.g.f.: x/(exp(x)-1)= U(0); U(k)= 2*k+1 - x(2*k+1)/(x + (2*k+2)/(1 + x/U(k+1))); (continued fraction). - Sergei N. Gladkovskii, Dec 05 2012
E.g.f.: 2*(x-1)/(x*Q(0)-2) where Q(k) = 1 + 2*x*(k+1)/((2*k+1)*(2*k+3) - x*(2*k+1)*(2*k+3)^2/(x*(2*k+3) + 4*(k+1)*(k+2)/Q(k+1))); (recursively defined continued fraction). - Sergei N. Gladkovskii, Feb 26 2013
a(n) = numerator(B(n)), B(n) = (-1)^n*Sum_{k=0..n} Stirling1(n,k) * Stirling2(n+k,n) / binomial(n+k,k). - Vladimir Kruchinin, Mar 16 2013
E.g.f.: x/(exp(x)-1) = E(0) where E(k) = 2*k+1 - x/(2 + x/E(k+1)); (continued fraction). - Sergei N. Gladkovskii, Mar 16 2013
G.f. for Bernoulli(n) = a(n)/A027642(n): psi_1(1/x)/x - x, where psi_n(z) is the polygamma function, psi_n(z) = (d/dz)^(n+1) log(Gamma(z)). - Vladimir Reshetnikov, Apr 24 2013
E.g.f.: 2*E(0) - 2*x, where E(k)= x + (k+1)/(1 + 1/(1 - x/E(k+1) )); (continued fraction). - Sergei N. Gladkovskii, Jul 10 2013
B_n = Sum_{m=0..n} (-1)^m *A131689(n, m)/(m + 1), n >= 0. See one of the Maple programs. - Wolfdieter Lang, May 05 2017
a(n) = numerator((-1)^n*A155585(n-1)*n/(4^n-2^n)), for n>=1. - Mats Granvik, Nov 26 2017
From Artur Jasinski, Dec 30 2020: (Start)
a(n) = numerator(-2*cos(Pi*n/2)*Gamma(n+1)*zeta(n)/(2*Pi)^n), for n=0 and n>1.
a(n) = numerator(-n*zeta(1-n)), for n=0 and n>1. (End)
a(n) = numerator(Sum_{k=0..n-1} (-1)^(k-1)*k!*Stirling2(n-1,k) / ((k+1)*(k+2))), for n>0 (see Jha link). - Bill McEachen, Jul 17 2025

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

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

A009006 Expansion of e.g.f.: 1 + tan(x).

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

Keywords

References

  • R. P. Stanley, Enumerative Combinatorics, Cambridge, Vol. 1, 1997; See Exercise 1.41(d).

Crossrefs

A000182(n) = a(2n-1).

Programs

  • Magma
    m:=30; R:=PowerSeriesRing(Rationals(), m); b:=Coefficients(R!(1 + Tan(x))); [Factorial(n-1)*b[n]: n in [1..m]]; // G. C. Greubel, Jul 21 2018
  • Maple
    u:=proc(n) if n=0 then 1 else -add(u(k)*binomial(n,k)/2*2^(n-k),k=0..n-1) fi end;seq(u(n),n=0..15); # Robert FERREOL, Dec 30 2006
  • Mathematica
    a[m_] := Abs[Sum[(-2)^(m-k) k! StirlingS2[m,k], {k,0,m}]]; Table[a[i], {i,0,20}] (* Peter Luschny, Apr 29 2009 *)
    A009006[n_] :=  Cos[Pi (n-1) / 2] (4^(n+1) - 2^(n+1)) * BernoulliB[n+1] / (n+1); a[0] := 1; Table[A009006[n], {n, 0, 30}] (* Peter Luschny, Jun 14 2021 *)
  • PARI
    a(n)=if(n<1,n==0,n!*polcoeff(tan(x+x*O(x^n)),n))
    
  • Sage
    def A009006(n) :
        if n == 0 : return 1
        return add(add((-1)^(n//2+j+1)*binomial(n+1,k-j)*j^n for j in (0..k)) for k in (1..n))
    [A009006(n) for n in (0..26)] # Peter Luschny, Jul 23 2012
    

Formula

Let b(n) be a(n) shifted one place to the left with b(2+4k) = -a(3+4k), k=0, 1, .. Then b(n) is the expansion of sech(x)^2. - Mario Catalani (mario.catalani(AT)unito.it), Feb 08 2003
g(x) = x + x^2 - 2*x^4 + 16*x^6 - 272*x^8 + ... satisfies g(x/(1+2x)) = -g(-x).
E.g.f.: 1 + tan(x).
E.g.f. exp(x)*sech(x) is 1,1,0,-2,0,16,0,-272,... (A155585). - Paul Barry, Mar 15 2006
From Robert FERREOL, Dec 30 2006: (Start)
a(n) = 2^n*abs(Euler(n,0)) where Euler(n,x) is the n-th Eulerian polynomial.
a(n) = abs(u(n)) where u(n) = -Sum_{k=0..n-1} u(k)*binomial(n, k)*2^(n-k-1) with u(0) = 1. (End)
Sum_{k=0..n} A075263(n, k)*2^k = 1,-1,0,2,0,-16,0,272,0,-7936,0,... for n = 0, 1, 2, 3, 4, ..., respectively. - Philippe Deléham, Aug 20 2007
E.g.f. -log(cos(x)), for n > 0. - Vladimir Kruchinin, Aug 09 2010
a(n) = Sum_{k=1..n} Sum_{j=0..k} (-1)^(floor(n/2)+j+1)*binomial(n+1,k-j)*j^n for n > 0. - Peter Luschny, Jul 23 2012
From Sergei N. Gladkovskii, Oct 25 2012 - Dec 20 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.: 1 + tan(x) = 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+tan(x) = 1 - 3*x/(U(0) + 3*x^2) where U(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)/U(k+1).
E.g.f.: 1+x*G(0) where G(k) = 1 - x^2/(x^2 - (2*k+1)*(2*k+3)/G(k+1)).
G.f.: 1 + x/G(0) where G(k) = 1 - 2*x^2*(4*k^2+4*k+1)-4*x^4*(k+1)^2*(4*k^2+8*k+3) /G(k+1).
G.f.: 1 + x*Q(0) where Q(k) = 1 - x^2*(k+1)*(k+2)/(x^2*(k+1)*(k+2) - 1/Q(k+1)).
G.f.: Q(0) where Q(k) = 1 + x*(k+1)/(x*(k+1)+1/(1- x*(k+1)/(x*(k+1) - 1/Q(k+1)))).
E.g.f.: 2 - 1/Q(0) where Q(k) = 1 + x/(4*k+1 - x/(1 - x/(4*k+3 + x/Q(k+1)))). (End)
a(n) ~ 2*n!*(2/Pi)^(n+1) if n is odd. - Vaclav Kotesovec, Jun 01 2013
a(n) = i^(n+1) * 2^n * ((-1)^n-1) * (2^(n+1)-1) * Bernoulli(n+1)/(n+1), n > 0. - Benedict W. J. Irwin, May 27 2016
a(0) = a(1) = 1; a(n) = -2 * a(n-1) + Sum_{k=0..n-1} binomial(n-1,k) * a(k) * a(n-k-1). - Ilya Gutkovskiy, Jul 05 2020

Extensions

Reformatted Mar 15 1997
Definition corrected by Joerg Arndt, Apr 29 2011
Terms a(26) onward added by G. C. Greubel, Jul 21 2018

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

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
Showing 1-10 of 55 results. Next