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

A091810 Hankel transform of the sequence A001469 (unsigned), Genocchi numbers of first kind.

Original entry on oeis.org

1, 2, 96, 497664, 825564856320, 1027134771639091200000, 1932215036193527461576704000000000, 9973959265081827837426668870219857920000000000000
Offset: 0

Views

Author

Philippe Deléham, Mar 07 2004

Keywords

Comments

This sequence is the Hankel transform (see A001906 for definition)of the sequence defined by, for n>=0, a(n) = |A001469(n+1)|; example: det([1, 1, 3, 17; 1, 3, 17, 155; 3, 17, 155, 2073; 17, 155, 2073, 38227]) = 497664 = 4!*12^4.

Crossrefs

Programs

  • Magma
    [Factorial(n+1)*(&*[(Factorial(k))^2: k in [0..n]])^2: n in [0..10]]; // G. C. Greubel, Oct 14 2018
  • Mathematica
    Table[(n + 1)!*BarnesG[n + 2]^4, {n, 0, 10}] (* G. C. Greubel, Oct 14 2018 *)
  • PARI
    for(n=0,10, print1((n+1)!*(prod(k=0,n, (k!)^2))^2, ", ")) \\ G. C. Greubel, Oct 14 2018
    

Formula

a(n) = (n+1)!*A000178(n)^4 = (n+1)!*A055209(n)^2.

A002450 a(n) = (4^n - 1)/3.

Original entry on oeis.org

0, 1, 5, 21, 85, 341, 1365, 5461, 21845, 87381, 349525, 1398101, 5592405, 22369621, 89478485, 357913941, 1431655765, 5726623061, 22906492245, 91625968981, 366503875925, 1466015503701, 5864062014805, 23456248059221, 93824992236885, 375299968947541
Offset: 0

Views

Author

Keywords

Comments

For n > 0, a(n) is the degree (n-1) "numbral" power of 5 (see A048888 for the definition of numbral arithmetic). Example: a(3) = 21, since the numbral square of 5 is 5(*)5 = 101(*)101(base 2) = 101 OR 10100 = 10101(base 2) = 21, where the OR is taken bitwise. - John W. Layman, Dec 18 2001
a(n) is composite for all n > 2 and has factors x, (3*x + 2*(-1)^n) where x belongs to A001045. In binary the terms greater than 0 are 1, 101, 10101, 1010101, etc. - John McNamara, Jan 16 2002
Number of n X 2 binary arrays with path of adjacent 1's from upper left corner to right column. - R. H. Hardin, Mar 16 2002
The Collatz-function iteration started at a(n), for n >= 1, will end at 1 after 2*n+1 steps. - Labos Elemer, Sep 30 2002 [corrected by Wolfdieter Lang, Aug 16 2021]
Second binomial transform of A001045. - Paul Barry, Mar 28 2003
All members of sequence are also generalized octagonal numbers (A001082). - Matthew Vandermast, Apr 10 2003
Also sum of squares of divisors of 2^(n-1): a(n) = A001157(A000079(n-1)), for n > 0. - Paul Barry, Apr 11 2003
Binomial transform of A000244 (with leading zero). - Paul Barry, Apr 11 2003
Number of walks of length 2n between two vertices at distance 2 in the cycle graph C_6. For n = 2 we have for example 5 walks of length 4 from vertex A to C: ABABC, ABCBC, ABCDC, AFABC and AFEDC. - Herbert Kociemba, May 31 2004
Also number of walks of length 2n + 1 between two vertices at distance 3 in the cycle graph C_12. - Herbert Kociemba, Jul 05 2004
a(n+1) is the number of steps that are made when generating all n-step random walks that begin in a given point P on a two-dimensional square lattice. To make one step means to mark one vertex on the lattice (compare A080674). - Pawel P. Mazur (Pawel.Mazur(AT)pwr.wroc.pl), Mar 13 2005
a(n+1) is the sum of square divisors of 4^n. - Paul Barry, Oct 13 2005
a(n+1) is the decimal number generated by the binary bits in the n-th generation of the Rule 250 elementary cellular automaton. - Eric W. Weisstein, Apr 08 2006
a(n-1) / a(n) = percentage of wasted storage if a single image is stored as a pyramid with a each subsequent higher resolution layer containing four times as many pixels as the previous layer. n is the number of layers. - Victor Brodsky (victorbrodsky(AT)gmail.com), Jun 15 2006
k is in the sequence if and only if C(4k + 1, k) (A052203) is odd. - Paul Barry, Mar 26 2007
This sequence also gives the number of distinct 3-colorings of the odd cycle C(2*n - 1). - Keith Briggs, Jun 19 2007
All numbers of the form m*4^m + (4^m-1)/3 have the property that they are sums of two squares and also their indices are the sum of two squares. This follows from the identity m*4^m + (4^m-1)/3 = 4(4(..4(4m + 1) + 1) + 1) + 1 ..) + 1. - Artur Jasinski, Nov 12 2007
For n > 0, terms are the numbers that, in base 4, are repunits: 1_4, 11_4, 111_4, 1111_4, etc. - Artur Jasinski, Sep 30 2008
Let A be the Hessenberg matrix of order n, defined by: A[1, j] = 1, A[i, i] := 5, (i > 1), A[i, i - 1] = -1, and A[i, j] = 0 otherwise. Then, for n >= 1, a(n) = charpoly(A,1). - Milan Janjic, Jan 27 2010
This is the sequence A(0, 1; 3, 4; 2) = A(0, 1; 4, 0; 1) of the family of sequences [a, b : c, d : k] considered by G. Detlefs, and treated as A(a, b; c, d; k) in the W. Lang link given below. - Wolfdieter Lang, Oct 18 2010
6*a(n) + 1 is every second Mersenne number greater than or equal to M3, hence all Mersenne primes greater than M2 must be a 6*a(n) + 1 of this sequence. - Roderick MacPhee, Nov 01 2010
Smallest number having alternating bit sum n. Cf. A065359.
For n = 1, 2, ..., the last digit of a(n) is 1, 5, 1, 5, ... . - Washington Bomfim, Jan 21 2011
Rule 50 elementary cellular automaton generates this sequence. This sequence also appears in the second column of array in A173588. - Paul Muljadi, Jan 27 2011
Sequence found by reading the line from 0, in the direction 0, 5, ... and the line from 1, in the direction 1, 21, ..., in the square spiral whose edges are the Jacobsthal numbers A001045 and whose vertices are the numbers A000975. These parallel lines are two semi-diagonals in the spiral. - Omar E. Pol, Sep 10 2011
a(n), n >= 1, is also the inverse of 3, denoted by 3^(-1), Modd(2^(2*n - 1)). For Modd n see a comment on A203571. E.g., a(2) = 5, 3 * 5 = 15 == 1 (Modd 8), because floor(15/8) = 1 is odd and -15 == 1 (mod 8). For n = 1 note that 3 * 1 = 3 == 1 (Modd 2) because floor(3/2) = 1 and -3 == 1 (mod 2). The inverse of 3 taken Modd 2^(2*n) coincides with 3^(-1) (mod 2^(2*n)) given in A007583(n), n >= 1. - Wolfdieter Lang, Mar 12 2012
If an AVL tree has a leaf at depth n, then the tree can contain no more than a(n+1) nodes total. - Mike Rosulek, Nov 20 2012
Also, this is the Lucas sequence V(5, 4). - Bruno Berselli, Jan 10 2013
Also, for n > 0, a(n) is an odd number whose Collatz trajectory contains no odd number other than n and 1. - Jayanta Basu, Mar 24 2013
Sum_{n >= 1} 1/a(n) converges to (3*(log(4/3) - QPolyGamma[0, 1, 1/4]))/log(4) = 1.263293058100271... = A321873. - K. G. Stier, Jun 23 2014
Consider n spheres in R^n: the i-th one (i=1, ..., n) has radius r(i) = 2^(1-i) and the coordinates of its center are (0, 0, ..., 0, r(i), 0, ..., 0) where r(i) is in position i. The coordinates of the intersection point in the positive orthant of these spheres are (2/a(n), 4/a(n), 8/a(n), 16/a(n), ...). For example in R^2, circles centered at (1, 0) and (0, 1/2), and with radii 1 and 1/2, meet at (2/5, 4/5). - Jean M. Morales, May 19 2015
From Peter Bala, Oct 11 2015: (Start)
a(n) gives the values of m such that binomial(4*m + 1,m) is odd. Cf. A003714, A048716, A263132.
2*a(n) = A020988(n) gives the values of m such that binomial(4*m + 2, m) is odd.
4*a(n) = A080674(n) gives the values of m such that binomial(4*m + 4, m) is odd. (End)
Collatz Conjecture Corollary: Except for powers of 2, the Collatz iteration of any positive integer must eventually reach a(n) and hence terminate at 1. - Gregory L. Simay, May 09 2016
Number of active (ON, black) cells at stage 2^n - 1 of the two-dimensional cellular automaton defined by "Rule 598", based on the 5-celled von Neumann neighborhood. - Robert Price, May 16 2016
From Luca Mariot and Enrico Formenti, Sep 26 2016: (Start)
a(n) is also the number of coprime pairs of polynomials (f, g) over GF(2) where both f and g have degree n + 1 and nonzero constant term.
a(n) is also the number of pairs of one-dimensional binary cellular automata with linear and bipermutive local rule of neighborhood size n+1 giving rise to orthogonal Latin squares of order 2^m, where m is a multiple of n. (End)
Except for 0, 1 and 5, all terms are Brazilian repunits numbers in base 4, and so belong to A125134. For n >= 3, all these terms are composite because a(n) = {(2^n-1) * (2^n + 1)}/3 and either (2^n - 1) or (2^n + 1) is a multiple of 3. - Bernard Schott, Apr 29 2017
Given the 3 X 3 matrix A = [2, 1, 1; 1, 2, 1; 1, 1, 2] and the 3 X 3 unit matrix I_3, A^n = a(n)(A - I_3) + I_3. - Nicolas Patrois, Jul 05 2017
The binary expansion of a(n) (n >= 1) consists of n 1's alternating with n - 1 0's. Example: a(4) = 85 = 1010101_2. - Emeric Deutsch, Aug 30 2017
a(n) (n >= 1) is the viabin number of the integer partition [n, n - 1, n - 2, ..., 2, 1] (for the definition of viabin number see comment in A290253). Example: a(4) = 85 = 1010101_2; consequently, the southeast border of the Ferrers board of the corresponding integer partition is ENENENEN, where E = (1, 0), N = (0, 1); this leads to the integer partition [4, 3, 2, 1]. - Emeric Deutsch, Aug 30 2017
Numbers whose binary and Gray-code representations are both palindromes (i.e., intersection of A006995 and A281379). - Amiram Eldar, May 17 2021
Starting with n = 1 the sequence satisfies {a(n) mod 6} = repeat{1, 5, 3}. - Wolfdieter Lang, Jan 14 2022
Terms >= 5 are those q for which the multiplicative order of 2 mod q is floor(log_2(q)) + 2 (and which is 1 more than the smallest possible order for any q). - Tim Seuré, Mar 09 2024
The order of 2 modulo a(n) is 2*n for n >= 2. - Joerg Arndt, Mar 09 2024

Examples

			Apply Collatz iteration to 9: 9, 28, 14, 7, 22, 11, 34, 17, 52, 26, 13, 40, 20, 10, 5 and hence 16, 8, 4, 2, 1.
Apply Collatz iteration to 27: 27, 82, 41, 124, 62, 31, 94, 47, 142, 71, 214, 107, 322, 161, 484, 242, 121, 364, 182, 91, 274, 137, 412, 206, 103, 310, 155, 466, 233, 700, 350, 175, 526, 263, 790, 395, 1186, 593, 1780, 890, 445, 1336, 668, 334, 167, 502, 251, 754, 377, 1132, 566, 283, 850, 425, 1276, 638, 319, 958, 479, 1438, 719, 2158, 1079, 3238, 1619, 4858, 2429, 7288, 3644, 1822, 911, 2734, 1367, 4102, 2051, 6154, 3077, 9232, 4616, 2308, 1154, 577, 1732, 866, 433, 1300, 650, 325, 976, 488, 244, 122, 61, 184, 92, 46, 23, 70, 35, 106, 53, 160, 80, 40, 20, 10, 5 and hence 16, 8, 4, 2, 1. [Corrected by _Sean A. Irvine_ at the suggestion of Stephen Cornelius, Mar 04 2024]
a(5) = (4^5 - 1)/3 = 341 = 11111_4 = {(2^5 - 1) * (2^5 + 1)}/3 = 31 * 33/3 = 31 * 11. - _Bernard Schott_, Apr 29 2017
		

References

  • A. Fletcher, J. C. P. Miller, L. Rosenhead and L. J. Comrie, An Index of Mathematical Tables. Vols. 1 and 2, 2nd ed., Blackwell, Oxford and Addison-Wesley, Reading, MA, 1962, Vol. 1, p. 112.
  • J. Riordan, Combinatorial Identities, Wiley, 1968, p. 217.
  • 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).

Crossrefs

Partial sums of powers of 4, A000302.
When converted to binary, this gives A094028.
Subsequence of A003714.
Primitive factors: A129735.

Programs

  • GAP
    List([0..25], n -> (4^n-1)/3); # Muniru A Asiru, Feb 18 2018
    
  • Haskell
    a002450 = (`div` 3) . a024036
    a002450_list = iterate ((+ 1) . (* 4)) 0
    -- Reinhard Zumkeller, Oct 03 2012
    
  • Magma
    [ (4^n-1)/3: n in [0..25] ]; // Klaus Brockhaus, Oct 28 2008
    
  • Magma
    [n le 2 select n-1 else 5*Self(n-1)-4*Self(n-2): n in [1..70]]; // Vincenzo Librandi, Jun 13 2015
    
  • Maple
    [seq((4^n-1)/3,n=0..40)];
    A002450:=1/(4*z-1)/(z-1); # Simon Plouffe in his 1992 dissertation, dropping the initial zero
  • Mathematica
    Table[(4^n - 1)/3, {n, 0, 127}] (* Vladimir Joseph Stephan Orlovsky, Sep 29 2008 *)
    LinearRecurrence[{5, -4}, {0, 1}, 30] (* Harvey P. Dale, Jun 23 2013 *)
  • Maxima
    makelist((4^n-1)/3, n, 0, 30); /* Martin Ettl, Nov 05 2012 */
    
  • PARI
    a(n) = (4^n-1)/3;
    
  • PARI
    my(z='z+O('z^40)); Vec(z/((1-z)*(1-4*z))) \\ Altug Alkan, Oct 11 2015
    
  • Python
    def A002450(n): return ((1<<(n<<1))-1)//3 # Chai Wah Wu, Jan 29 2023
  • Scala
    ((List.fill(20)(4: BigInt)).scanLeft(1: BigInt)( * )).scanLeft(0: BigInt)( + ) // Alonso del Arte, Sep 17 2019
    

Formula

From Wolfdieter Lang, Apr 24 2001: (Start)
a(n+1) = Sum_{m = 0..n} A060921(n, m).
G.f.: x/((1-x)*(1-4*x)). (End)
a(n) = Sum_{k = 0..n-1} 4^k; a(n) = A001045(2*n). - Paul Barry, Mar 17 2003
E.g.f.: (exp(4*x) - exp(x))/3. - Paul Barry, Mar 28 2003
a(n) = (A007583(n) - 1)/2. - N. J. A. Sloane, May 16 2003
a(n) = A000975(2*n)/2. - N. J. A. Sloane, Sep 13 2003
a(n) = A084160(n)/2. - N. J. A. Sloane, Sep 13 2003
a(n+1) = 4*a(n) + 1, with a(0) = 0. - Philippe Deléham, Feb 25 2004
a(n) = Sum_{i = 0..n-1} C(2*n - 1 - i, i)*2^i. - Mario Catalani (mario.catalani(AT)unito.it), Jul 23 2004
a(n+1) = Sum_{k = 0..n} binomial(n+1, k+1)*3^k. - Paul Barry, Aug 20 2004
a(n) = center term in M^n * [1 0 0], where M is the 3 X 3 matrix [1 1 1 / 1 3 1 / 1 1 1]. M^n * [1 0 0] = [A007583(n-1) a(n) A007583(n-1)]. E.g., a(4) = 85 since M^4 * [1 0 0] = [43 85 43] = [A007583(3) a(4) A007583(3)]. - Gary W. Adamson, Dec 18 2004
a(n) = Sum_{k = 0..n, j = 0..n} C(n, j)*C(j, k)*A001045(j - k). - Paul Barry, Feb 15 2005
a(n) = Sum_{k = 0..n} C(n, k)*A001045(n-k)*2^k = Sum_{k = 0..n} C(n, k)*A001045(k)*2^(n-k). - Paul Barry, Apr 22 2005
a(n) = A125118(n, 3) for n > 2. - Reinhard Zumkeller, Nov 21 2006
a(n) = Sum_{k = 0..n} 2^(n - k)*A128908(n, k), n >= 1. - Philippe Deléham, Oct 19 2008
a(n) = Sum_{k = 0..n} A106566(n, k)*A100335(k). - Philippe Deléham, Oct 30 2008
If we define f(m, j, x) = Sum_{k = j..m} binomial(m, k)*stirling2(k, j)*x^(m - k) then a(n-1) = f(2*n, 4, -2), n >= 2. - Milan Janjic, Apr 26 2009
a(n) = A014551(n) * A001045(n). - R. J. Mathar, Jul 08 2009
a(n) = 4*a(n-1) + a(n-2) - 4*a(n-3) = 5*a(n-1) - 4*a(n-2), a(0) = 0, a(1) = 1, a(2) = 5. - Wolfdieter Lang, Oct 18 2010
a(0) = 0, a(n+1) = a(n) + 2^(2*n). - Washington Bomfim, Jan 21 2011
A036555(a(n)) = 2*n. - Reinhard Zumkeller, Jan 28 2011
a(n) = Sum_{k = 1..floor((n+2)/3)} C(2*n + 1, n + 2 - 3*k). - Mircea Merca, Jun 25 2011
a(n) = Sum_{i = 1..n} binomial(2*n + 1, 2*i)/3. - Wesley Ivan Hurt, Mar 14 2015
a(n+1) = 2^(2*n) + a(n), a(0) = 0. - Ben Paul Thurston, Dec 27 2015
a(k*n)/a(n) = 1 + 4^n + ... + 4^((k-1)*n). - Gregory L. Simay, Jun 09 2016
Dirichlet g.f.: (PolyLog(s, 4) - zeta(s))/3. - Ilya Gutkovskiy, Jun 26 2016
A000120(a(n)) = n. - André Dalwigk, Mar 26 2018
a(m) divides a(m*n), in particular: a(2*n) == 0 (mod 5), a(3*n) == 0 (mod 3*7), a(5*n) == 0 (mod 11*31), etc. - M. F. Hasler, Oct 19 2018
a(n) = 4^(n-1) + a(n-1). - Bob Selcoe, Jan 01 2020
a(n) = A178415(1, n) = A347834(1, n-1), arrays, for n >= 1. - Wolfdieter Lang, Nov 29 2021
a(n) = A000225(2*n)/3. - John Keith, Jan 22 2022
a(n) = A080674(n) + 1 = A047849(n) - 1 = A163834(n) - 2 = A155701(n) - 3 = A163868(n) - 4 = A156605(n) - 7. - Ray Chandler, Jun 16 2023
From Peter Bala, Jul 23 2025: (Start)
The following are examples of telescoping products. Cf. A016153:
Product_{k = 1..2*n} 1 + 2^k/a(k+1) = a(n+1)/A007583(n) = (4^(n+1) - 1)/(2*4^n + 1).
Hence, Product_{k >= 1} 1 + 2^k/a(k+1) = 2.
Product_{k >= 1} 1 - 2^k/a(k+1) = 2/5, since 1 - 2^n/a(n+1) = b(n)/b(n-1), where b(n) = 2 - 3/(1 - 2^(n+1)).
Product_{k >= 1} 1 + (-2)^k/a(k+1) = 2/3, since 1 + (-2)^n/a(n+1) = c(n)/c(n-1), where c(n) = 2 - 1/(1 + (-2)^(n+1)).
Product_{k >= 1} 1 - (-2)^k/a(k+1) = 6/5, since 1 - (-2)^n/a(n+1) = d(n)/d(n-1), where d(n) = 2 - 1/(1 - (-2)^(n+1)). (End)

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

A110501 Unsigned Genocchi numbers (of first kind) of even index.

Original entry on oeis.org

1, 1, 3, 17, 155, 2073, 38227, 929569, 28820619, 1109652905, 51943281731, 2905151042481, 191329672483963, 14655626154768697, 1291885088448017715, 129848163681107301953, 14761446733784164001387, 1884515541728818675112649, 268463531464165471482681379
Offset: 1

Views

Author

Michael Somos, Jul 23 2005

Keywords

Comments

The Genocchi numbers satisfy Seidel's recurrence: for n > 1, 0 = Sum_{j=0..floor(n/2)} (-1)^j*binomial(n, 2*j)*a(n-j). - Ralf Stephan, Apr 17 2004
The (n+1)-st Genocchi number is the number of Dumont permutations of the first kind on 2n letters. In a Dumont permutation of the first kind, each even integer must be followed by a smaller integer and each odd integer is either followed by a larger integer or is the last element. - Ralf Stephan, Apr 26 2004
The (n+1)-st Genocchi number is also the number of ways to place n rooks (attacking along planes; also called super rooks of power 2 by Golomb and Posner) on the three-dimensional Genocchi boards of size n. The Genocchi board of size n consists of cells of the form (i, j, k) where min{i, j} <= k and 1 <= k <= n. A rook placement on this board can also be realized as a pair of permutations of n the smallest number in the i-th position of the two permutations is not larger than i. - Feryal Alayont, Nov 03 2012
The (n+1)-st Genocchi number is also the number of Dumont permutations of the second kind, third kind, and fourth kind on 2n letters. In a Dumont permutation of the second kind, all odd positions are weak excedances and all even positions are deficiencies. In a Dumont permutation of the third kind, all descents are from an even value to an even value. In a Dumont permutation of the fourth kind, all deficiencies are even values at even positions. - Alexander Burstein, Jun 21 2019
The (n+1)-st Genocchi number is also the number of semistandard Young tableaux of skew shape (n+1,n,...,1)/(n-1,n-2,...,1) such that the entries in row i are at most i for i=1,...,n+1. - Alejandro H. Morales, Jul 26 2020
The (n+1)-st Genocchi number is also the number of positive terms of the Okounkov-Olshanski formula for the number of standard tableaux of skew shape (n+1,n,n-1,...,1)/(n-1,n-2,...,1), given by the (2n+1)-st Euler number A000111. - Alejandro H. Morales, Jul 26 2020
The (n+1)-st Genocchi number is also the number of collapsed permutations in (2n-1) letters. A permutation pi of size 2n-1 is said to be collapsed if ceil(k/2) <= pi^{-1}(k) <= n + floor(k/2). There are 3 collapsed permutations of size 3, namely 123, 132 and 213. - Arvind Ayyer, Oct 23 2020

Examples

			E.g.f.: x*tan(x/2) = x^2/2! + x^4/4! + 3*x^6/6! + 17*x^8/8! + 155*x^10/10! + ...
O.g.f.: A(x) = x + x^2 + 3*x^3 + 17*x^4 + 155*x^5 + 2073*x^6 + ...
where A(x) = x + x^2/(1+x) + 2!^2*x^3/((1+x)*(1+4*x)) + 3!^2*x^4/((1+x)*(1+4*x)*(1+9*x)) + 4!^2*x^5/((1+x)*(1+4*x)*(1+9*x)*(1+16*x)) + ... . - _Paul D. Hanna_, Jul 21 2011
From _Gary W. Adamson_, Jul 19 2011: (Start)
The first few rows of production matrix M are:
  1, 2,  0,  0,  0, 0, ...
  1, 3,  3,  0,  0, 0, ...
  1, 4,  6,  4,  0, 0, ...
  1, 5, 10, 10,  5, 0, ...
  1, 6, 15, 20, 15, 6, ... (End)
		

References

  • L. Carlitz, A conjecture concerning Genocchi numbers. Norske Vid. Selsk. Skr. (Trondheim) 1971, no. 9, 4 pp. MR0297697 (45 #6749)
  • L. Comtet, Advanced Combinatorics, Reidel, 1974, p. 49.
  • Leonhard Euler, Institutionum Calculi Differentialis, volume 2 (1755), para. 181.
  • A. Genocchi, Intorno all'espressione generale de'numeri Bernulliani, Ann. Sci. Mat. Fis., 3 (1852), 395-405.
  • R. P. Stanley, Enumerative Combinatorics, Cambridge, Vol. 2 (1999) p. 74; see Problem 5.8.

Crossrefs

Programs

  • Magma
    [Abs(2*(4^n-1)*Bernoulli(2*n)): n in [1..20]]; // Vincenzo Librandi, Jul 28 2017
    
  • Maple
    A110501 := proc(n)
        2*(-1)^n*(1-4^n)*bernoulli(2*n) ;
    end proc:
    seq(A110501(n),n=0..10) ; # R. J. Mathar, Aug 02 2013
  • Mathematica
    a[n_] := 2*(4^n - 1) * BernoulliB[2n] // Abs; Table[a[n], {n, 19}] (* Jean-François Alcover, May 23 2013 *)
  • PARI
    {a(n) = if( n<1, 0, 2 * (-1)^n * (1 - 4^n) * bernfrac( 2*n))};
    
  • PARI
    {a(n) = if( n<1, 0, (2*n)! * polcoeff( x * tan(x/2 + x * O(x^(2*n))), 2*n))};
    
  • PARI
    {a(n)=polcoeff(sum(m=0,n,m!^2*x^(m+1)/prod(k=1,m, 1+k^2*x+x*O(x^n))),n)} /* Paul D. Hanna, Jul 21 2011 */
    
  • PARI
    upto(n) = my(v1, v2, v3); v1 = vector(n, i, 0); v1[1] = 1; v2 = vector(n-1, i, ((i+1)^2)\4); v3 = v1; for(i=2, n, for(j=2, i-1, v1[j] += v2[i-j+1]*v1[j-1]); v1[i] = v1[i-1]; v3[i] = v1[i]); v3 \\ Mikhail Kurkov, Aug 28 2025
    
  • Python
    from sympy import bernoulli
    def A110501(n): return ((2<<(m:=n<<1))-2)*abs(bernoulli(m)) # Chai Wah Wu, Apr 14 2023
  • Sage
    # Algorithm of L. Seidel (1877)
    # n -> [a(1), ..., a(n)] for n >= 1.
    def A110501_list(n) :
        D = []; [D.append(0) for i in (0..n+2)]; D[1] = 1
        R = [] ; b = True
        for i in(0..2*n-1) :
            h = i//2 + 1
            if b :
                for k in range(h-1,0,-1) : D[k] += D[k+1]
            else :
                for k in range(1,h+1,1) :  D[k] += D[k-1]
            b = not b
            if b : R.append(D[h])
        return R
    A110501_list(19) # Peter Luschny, Apr 01 2012
    
  • Sage
    [2*(-1)^n*(1-4^n)*bernoulli(2*n) for n in (1..20)] # G. C. Greubel, Nov 28 2018
    

Formula

(-1)^n * a(n) = A036968(2*n) = A001469(n).
a(n) = 2*(-1)^n*(1-4^n)*B_{2*n} (B = A027641/A027642 are Bernoulli numbers).
A002105(n) = 2^(n-1)/n * a(n). - Don Knuth, Jan 16 2007
A000111(2*n-1) = a(n)*2^(2*n-2)/n. - Alejandro H. Morales, Jul 26 2020
E.g.f.: x * tan(x/2) = Sum_{k > 0} a(k) * x^(2*k) / (2*k)!.
E.g.f.: x * tan(x/2) = x^2 / (2 - x^2 / (6 - x^2 / (... 4*k+2 - x^2 / (...)))). - Michael Somos, Mar 13 2014
O.g.f.: Sum_{n >= 0} n!^2 * x^(n+1) / Product_{k = 1..n} (1 + k^2*x). - Paul D. Hanna, Jul 21 2011
a(n) = Sum_{k = 0..2*n} (-1)^(n-k+1)*Stirling2(2*n, k)*A059371(k). - Vladeta Jovovic, Feb 07 2004
O.g.f.: A(x) = x/(1-x/(1-2*x/(1-4*x/(1-6*x/(1-9*x/(1-12*x/(... -[(n+1)/2]*[(n+2)/2]*x/(1- ...)))))))) (continued fraction). - Paul D. Hanna, Jan 16 2006
a(n) = Pi^(-2*n)*integral(log(t/(1-t))^(2*n)-log(1-1/t)^(2*n) dt,t=0,1). - Gerry Martens, May 25 2011
a(n) = the upper left term of M^(n-1); M is an infinite square production matrix with M[i,j] = C(i+1,j-1), i.e., Pascal's triangle without the first two rows and right border, see the examples and Maple program. - Gary W. Adamson, Jul 19 2011
G.f.: 1/U(0) where U(k) = 1 + 2*(k^2)*x - x*((k+1)^2)*(x*(k^2)+1)/U(k+1); (continued fraction, Euler's 1st kind, 1-step). - Sergei N. Gladkovskii, Sep 15 2012
a(n+1) = Sum_{k=0..n} A211183(n, k)*2^(n-k). - Philippe Deléham, Feb 03 2013
G.f.: 1 + x/(G(0)-x) where G(k) = 2*x*(k+1)^2 + 1 - x*(k+2)^2*(x*k^2+2*x*k+x+1)/G(k+1); (continued fraction). - Sergei N. Gladkovskii, Feb 10 2013
G.f.: G(0) where G(k) = 1 + x*(2*k+1)^2/( 1 + x + 4*x*k + 4*x*k^2 - 4*x*(k+1)^2*(1 + x + 4*x*k + 4*x*k^2)/(4*x*(k+1)^2 + (1 + 4*x + 8*x*k + 4*x*k^2)/G(k+1) )); (continued fraction). - Sergei N. Gladkovskii, Feb 11 2013
G.f.: R(0), where R(k) = 1 - x*(k+1)^2/( x*(k+1)^2 - 1/(1 - x*(k+1)*(k+2)/( x*(k+1)*(k+2) - 1/R(k+1) ))); (continued fraction). - Sergei N. Gladkovskii, Oct 27 2013
E.g.f. (offset 1): sqrt(x)*tan(sqrt(x)/2) = Q(0)*x/2, where Q(k) = 1 - x/(x - 4*(2*k+1)*(2*k+3)/Q(k+1) ); (continued fraction). - Sergei N. Gladkovskii, Jan 06 2014
Pi^2/6 = 2*Sum_{k=1..N} (-1)^(k-1)/k^2 + (-1)^N/N^2(1 - 1/N + 1/N^3 - 3/N^5 + 17/N^7 - 155/N^9 +- ...), where the terms in the parenthesis are (-1)^n*a(n)/N^(2n-1). - M. F. Hasler, Mar 11 2015
a(n) = 2*n*|euler(2*n-1, 0)|. - Peter Luschny, Jun 09 2016
a(n) = 4^(1-n) * (4^n-1) * Pi^(-2*n) * (2*n)! * zeta(2*n). - Daniel Suteu, Oct 14 2016
a(n) ~ 8*Pi*(2^(2*n)-1)*(n/(Pi*exp(1)))^(2*n+1/2)*exp(1/2+(1/24)/n-(1/2880)/n^3+(1/40320)/n^5+...). [Given in A001469 by Peter Luschny, Jul 24 2013, copied May 14 2022.]
a(n) = A000182(n) * n / 4^(n-1) (Han and Liu, 2018). - Amiram Eldar, May 17 2024

Extensions

Edited by M. F. Hasler, Mar 22 2015

A002105 Reduced tangent numbers: 2^n*(2^{2n} - 1)*|B_{2n}|/n, where B_n = Bernoulli numbers.

Original entry on oeis.org

1, 1, 4, 34, 496, 11056, 349504, 14873104, 819786496, 56814228736, 4835447317504, 495812444583424, 60283564499562496, 8575634961418940416, 1411083019275488149504, 265929039218907754399744, 56906245479134057176170496, 13722623393637762299131396096, 3704005473270641755597685653504
Offset: 1

Views

Author

Keywords

Comments

Comments from R. L. Graham, Apr 25 2006 and Jun 08 2006: "This sequence also gives the number of ways of arranging 2n tokens in a row, with 2 copies of each token from 1 through n, such that the first token is a 1 and between every pair of tokens labeled i (i=1..n-1) there is exactly one token labeled i+1.
"For example, for n=3, there are 4 possibilities: 123123, 121323, 132312 and 132132 and indeed a(3) = 4. This is the work of my Ph. D. student Nan Zang. See also A117513, A117514, A117515.
"Develin and Sullivant give another occurrence of this sequence and show that their numbers have the same generating function, although they were unable to find a 1-1-mapping between their problem and Poupard's."
The sequence 1,0,1,0,4,0,34,0,496,0,11056, ... counts increasing complete binary trees with e.g.f. sec^2(x/sqrt 2). - Wenjin Woan, Oct 03 2007
a(n) = number of increasing full binary trees on vertex set [2n-1] with the left-largest property: the largest descendant of each non-leaf vertex occurs in its left subtree (Poupard). The first Mathematica recurrence below counts these trees by number 2k-1 of vertices in the left subtree of the root: the root is necessarily labeled 1 and n necessarily occurs in the left subtree and so there are Binomial[2n-3,2k-2] ways to choose the remaining labels for the left subtree. - David Callan, Nov 29 2007
Number of bilabeled unordered increasing trees with 2n labels. - Markus Kuba, Nov 18 2014
Conjecture: taking the sequence modulo an integer k gives an eventually purely periodic sequence with period dividing phi(k). For example, the sequence taken modulo 10 begins [1, 1, 4, 4, 6, 6, 4, 4, 6, 6, 4, 4, 6, 6, ...] with an apparent period [4, 4, 6, 6] of length 4 = phi(10) beginning at a(3). - Peter Bala, May 08 2023
Let c(1), c(2), c(3), ... be a geometric progression and s = (2*c(1)/c(2))^(1/2). Then c(1)*s*tan(x/s) = Sum_{n>0} a(n) * c(n) * x^(2*n-1) / (2*n-1)!. - Michael Somos, Jan 15 2025

Examples

			G.f. = x + x^2 + 4*x^3 + 34*x^4 + 496*x^5 + 11056*x^6 + 349504*x^7 + ...
		

References

  • 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).

Crossrefs

Row sums of A008301.
Left edge of triangle A210108.

Programs

  • Magma
    A002105:= func< n | (-1)^(n+1)*2^n*(4^n - 1)*Bernoulli(2*n)/n >;
    [A002105(n): n in [1..30]]; // G. C. Greubel, Sep 20 2024
  • Maple
    S := proc(n, k) option remember; if k=0 then `if`(n=0, 1, 0) else S(n, k-1) + S(n-1, n-k) fi end: A002105 := n -> S(2*n-1, 2*n-1)/2^(n-1): seq(A002105(i),i=1..16); # Peter Luschny, Jul 08 2012
    # The above function written as a formula: a(n) = A008281(2*n-1, 2*n-1)/2^(n-1).
    # Alternatively, based on the triangular numbers A000217:
    T := proc(n, k) option remember; if k = 0 then 1 else if k = n then T(n, k-1) else
    A000217(n - k + 1) * T(n, k - 1) + T(n - 1, k) fi fi end:
    a := n -> T(n, n): seq(a(n), n = 0..18);  # Peter Luschny, Sep 30 2023
  • Mathematica
    u[1] = 1; u[n_]/;n>=2 := u[n] = Sum[Binomial[2n-3,2k-2]u[k]u[n-k],{k,n-1}]; Table[u[n],{n,8}] (* Poupard and also Develin and Sullivant, give a different recurrence that involves a symmetric sum: v[1] = 1; v[n_]/;n>=2 := v[n] = 1/2 Sum[Binomial[2n-2,2k-1]v[k]v[n-k],{k,n-1}] *) (*David Callan, Nov 29 2007 *)
    a[n_] := (-1)^n 2^(n+1) PolyLog[1-2n, -1]; Array[a, 10] (* Vladimir Reshetnikov, Jan 23 2011 *)
    Table[(-1)^(n+1)*2^n*(2^(2n)-1)*BernoulliB[2n]/n,{n,1,20}] (* Vaclav Kotesovec, Nov 03 2014 *)
    eulerCF[f_, len_] := Module[{g}, g[len-1]=1; g[k_]:=g[k]=1-f[k]/(f[k]-1/g[k+1]); CoefficientList[g[0] + O[x]^len, x]]; A002105List[len_] := eulerCF[(1/2) x (#+1) (#+2)&, len]; A002105List[19] (* Peter Luschny, Aug 08 2015 after Sergei N. Gladkovskii *)
    Table[PolyGamma[2n-1, 1/2] 2^(2-n)/Pi^(2n), {n, 1, 10}] (* Vladimir Reshetnikov, Oct 18 2015 *)
    Table[EulerE[2n-1, 0] (-2)^n, {n, 1, 10}] (* Vladimir Reshetnikov, Oct 21 2015 *)
  • PARI
    {a(n) = if( n<1, 0, ((-2)^n - (-8)^n) * bernfrac(2*n) / n)}; /* Michael Somos, Jun 22 2002 */
    
  • PARI
    {a(n) = if( n<0, 0, (2*n)! * polcoeff( -2 * log( cos(x / quadgen(8) + O(x^(2*n + 1)))), 2*n))}; /* Michael Somos, Jul 17 2003 */
    
  • PARI
    {a(n) = if( n<0, 0, -(-2)^(n+1) * sum(i=1, 2*n, 2^-i * sum(j=1, i, (-1)^j * binomial( i-1, j-1) * j^(2*n - 1))))}; /* Michael Somos, Sep 07 2013 */
    
  • PARI
    {a(n)=local(CF=1+x*O(x^n));if(n<1,return(0), for(k=1,n,CF=1/(1-(n-k+1)*(n-k+2)/2*x*CF));return(Vec(CF)[n]))}  /* Paul D. Hanna */
    
  • PARI
    {a(n)=local(X=x+x*O(x^n),Egf);Egf=sum(m=0,n,prod(k=1,m,tanh(k*X)));n!*polcoeff(Egf,n)} /* Paul D. Hanna, May 11 2010 */
    
  • Python
    from sympy import bernoulli
    def A002105(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 A002105_list(n) :
        D = [0]*(n+2); D[1] = 1
        R = []; z = 1/2; b = True
        for i in(0..2*n-1) :
            h = i//2 + 1
            if b :
                for k in range(h-1, 0, -1) : D[k] += D[k+1]
                z *= 2
            else :
                for k in range(1, h+1, 1) :  D[k] += D[k-1]
            b = not b
            if b : R.append(D[h]*z/h)
        return R
    A002105_list(16) # Peter Luschny, Jun 29 2012
    
  • SageMath
    def A002105(n): return (-1)^(n+1)*2^n*(4^n -1)*bernoulli(2*n)/n
    [A002105(n) for n in range(1,31)] # G. C. Greubel, Sep 20 2024
    

Formula

E.g.f.: 2*log(sec(x / sqrt(2))) = Sum_{n>0} a(n) * x^(2*n) / (2*n)!. - Michael Somos, Jun 22 2002
A000182(n) = 2^(n-1) * a(n). - Michael Somos, Jun 22 2002
a(n) = 2^(n-1)/n * A110501(n). - Don Knuth, Jan 16 2007
a(n+1) = Sum_{k = 0..n} A094665(n, k). - Philippe Deléham, Jun 11 2004
O.g.f.: A(x) = x/(1-x/(1-3*x/(1-6*x/(1-10*x/(1-15*x/(... -n*(n+1)/2*x/(1 - ...))))))) (continued fraction). - Paul D. Hanna, Oct 07 2005
sqrt(2) tan( x/sqrt(2)) = Sum_(n>=0) (x^(2n+1)/(2n+1)!) a_n. - Dominique Foata and Guo-Niu Han, Oct 24 2008
Basic hypergeometric generating function: Sum_{n>=0} Product {k = 1..n} (1-exp(-2*k*t))/Product {k = 1..n} (1+exp(-2*k*t)) = 1 + t + 4*t^2/2! + 34*t^3/3! + 496*t^4/4! + ... [Andrews et al., Theorem 4]. For other sequences with generating functions of a similar type see A000364, A000464, A002439, A079144 and A158690. - Peter Bala, Mar 24 2009
E.g.f.: Sum_{n>=0} Product_{k=1..n} tanh(k*x) = Sum_{n>=0} a(n)*x^n/n!. - Paul D. Hanna, May 11 2010
a(n) = (-1)^(n+1)*sum(j!*stirling2(2*n+1,j)*2^(n+1-j)*(-1)^(j),j,1,2*n+1), n>=0. - Vladimir Kruchinin, Aug 23 2010
From Gary W. Adamson, Jul 14 2011: (Start)
a(n) = upper left term in M^n, a(n+1) = sum of top row terms in M^n; where M = the infinite square production matrix:
1, 3, 0, 0, 0, 0, 0, ...
1, 3, 6, 0, 0, 0, 0, ...
1, 3, 6, 10, 0, 0, 0, ...
1, 3, 6, 10, 15, 0, 0, ... (End)
E.g.f. A(x) satisfies differential equation A''(x)=exp(A(x)). - Vladimir Kruchinin, Nov 18 2011
E.g.f.: For E(x)=sqrt(2)* tan( x/sqrt(2))=x/G(0); G(k)= 4*k + 1 - x^2/(8*k + 6 - x^2/G(k+1)); (from continued fraction Lambert's, 2-step). - Sergei N. Gladkovskii, Jan 14 2012
a(n) = (-1)^n*2^(n+1)*Li_{1-2*n}(-1). (See also the Mathematica prog. by Vladimir Reshetnikov.) - Peter Luschny, Jun 28 2012
G.f.: 1/G(0) where G(k) = 1 - x*( 4*k^2 + 4*k + 1 ) - x^2*(k+1)^2*( 4*k^2 + 8*k + 3)/G(k+1); (continued fraction). - Sergei N. Gladkovskii, Jan 14 2013
G.f.: 1/Q(0), where Q(k) = 1 - (k+1)*(k+2)/2*x/Q(k+1); (continued fraction). - Sergei N. Gladkovskii, May 03 2013
G.f.: (1/G(0))/sqrt(x) - 1/sqrt(x), where G(k) = 1 - sqrt(x)*(2*k+1)/(1 + sqrt(x)*(2*k+1)/(1 + sqrt(x)*(k+1)/(1 - sqrt(x)*(k+1)/G(k+1) ))); (continued fraction). - Sergei N. Gladkovskii, Jul 07 2013
log(2) - 1/1 + 1/2 - 1/3 + ... + (-1)^n / n = (-1)^n / 2 * (1/n - 1 / (2*n^2) + 1 / (2*n^2)^2 - 4 / (2*n^2)^3 + ... + (-1)^k * a(k) / (2*n^2)^k + ...) asymptotic expansion. - Michael Somos, Sep 07 2013
G.f.: T(0), where T(k) = 1-x*(k+1)*(k+2)/(x*(k+1)*(k+2)-2/T(k+1) ); (continued fraction). - Sergei N. Gladkovskii, Oct 24 2013
a(n) ~ 2^(3*n+2) * n^(2*n-1/2) / (exp(2*n) * Pi^(2*n-1/2)). - Vaclav Kotesovec, Nov 03 2014
From Peter Bala, Sep 10 2015: (Start)
The e.g.f. A(x) = sqrt(2)*tan(x/sqrt(2)) satisfies A''(x) = A(x)*A'(x), hence the recurrence a(0) = 0, a(1) = 1, else a(n) = Sum_{i = 0..n-2} binomial(n-2,i)*a(i)*a(n-1-i) for the aerated sequence [0,1,0,1,0,4,0,34,0,496,...].
Note that the same recurrence, but with the initial conditions a(0) = 1 and a(1) = 1, produces the sequence [1,1,1,2,5,16,61,272,...] = A000111. (End)
a(n) = polygamma(2*n-1, 1/2)*2^(2-n)/Pi^(2*n). - Vladimir Reshetnikov, Oct 18 2015
E.g.f.: sqrt(2)*tan(x/sqrt(2)) = Sum_{n>0} a(n) * x^(2*n-1) / (2*n-1)!. - Michael Somos, Mar 05 2017
From Peter Bala, May 05 2017: (Start)
Let B(x) = A(x)/x = 1 + x + 4*x^2 + 34*x^3 + ... denote the shifted o.g.f. Then B(x) = 1/(1 + 2*x - 3*x/(1 - x/(1 + 2*x - 10*x/(1 - 6*x/(1 + 2*x - 21*x/(1 - 15*x/(1 + 2*x - 36*x/(1 - 28*x/(1 + 2*x - ...))))))))), where the coefficient sequence [3, 1, 10, 6, 21, 15, 36, 28, ...] in the partial numerators of the continued fraction is obtained by swapping adjacent triangular numbers. Cf. A079144.
It follows (by means of an equivalence transformation) that the second binomial transform of B(x), with g.f. equal to 1/(1 - 2*x)*B(x/(1 - 2*x)), has the S-fraction representation 1/(1 - 3*x/(1 - x/(1 - 10*x/(1 - 6*x/(1 - 21*x/(1 - 15*x/(1 - 36*x/(1 - 28*x/(1 - ...))))))))). Compare with the S-fraction representation of the g.f. A(x) given above by Hanna, dated Oct 07 2005. (End)
The computation can be based on the triangular numbers, a(n) = T(n, n) where T(n, k) = A000217(n - k + 1) * T(n, k - 1) + T(n - 1, k) for 0 < k < n, and T(n, 0) = 1, T(n, n) = T(n, k-1) if k > 0. This is equivalent to Paul D. Hanna's continued fraction 2005. - Peter Luschny, Sep 30 2023

Extensions

Additional comments from Michael Somos, Jun 25 2002

A036968 Genocchi numbers (of first kind): expansion of 2*x/(exp(x)+1).

Original entry on oeis.org

1, -1, 0, 1, 0, -3, 0, 17, 0, -155, 0, 2073, 0, -38227, 0, 929569, 0, -28820619, 0, 1109652905, 0, -51943281731, 0, 2905151042481, 0, -191329672483963, 0, 14655626154768697, 0, -1291885088448017715, 0, 129848163681107301953
Offset: 1

Views

Author

Keywords

Comments

The sign of a(1) depends on which convention one chooses: B(n) = B_n(1) or B(n) = B_n(0) where B(n) are the Bernoulli numbers and B_n(x) the Bernoulli polynomials (see the Wikipedia article on Bernoulli numbers). The definition given is in line with B(n) = B_n(0). The convention B(n) = B_n(1) corresponds to the e.g.f. -2*x/(1+exp(-x)). - Peter Luschny, Jun 28 2013
According to Hetyei [2017], "alternation acyclic tournaments in which at least one ascent begins at each vertex, except for the largest one, are counted by the Genocchi numbers of the first kind." - Danny Rorabaugh, Apr 25 2017
Named after the Italian mathematician Angelo Genocchi (1817-1889). - Amiram Eldar, Jun 06 2021
Conjecture: For any positive integer n, -a(n+1) is the permanent of the n X n matrix M with M(j, k) = floor((2*j - k)/n), (j,k=1..n). - Zhi-Wei Sun, Sep 07 2021
A corresponding conjecture can also be made for L. Seidel's 'Genocchi numbers of second kind' A005439. - Peter Luschny, Sep 08 2021

References

  • Louis Comtet, Advanced Combinatorics, Reidel, 1974, p. 49.
  • A. Fletcher, J. C. P. Miller, L. Rosenhead and L. J. Comrie, An Index of Mathematical Tables. Vols. 1 and 2, 2nd ed., Blackwell, Oxford and Addison-Wesley, Reading, MA, 1962, Vol. 1, p. 73.
  • Ronald L. Graham, Donald E. Knuth and Oren Patashnik, Concrete Mathematics. Addison-Wesley, Reading, MA, 1990, p. 528.
  • Richard P. Stanley, Enumerative Combinatorics, Cambridge, Vol. 2, 1999; see Problem 5.8.

Crossrefs

A001469 is the main entry for this sequence. A226158 is another version.
Cf. A005439 (Genocchi numbers of second kind).

Programs

  • Maple
    a := n -> n*euler(n-1,0); # Peter Luschny, Jul 13 2009
  • Mathematica
    a[n_] := n*EulerE[n - 1, 0]; Table[a[n], {n, 1, 32}] (* Jean-François Alcover, Dec 08 2011, after Peter Luschny *)
    Range[0, 31]! CoefficientList[ Series[ 2x/(1 + Exp[x]), {x, 0, 32}], x] (* Robert G. Wilson v, Oct 26 2012 *)
    Table[(-1)^n 2 n PolyLog[1 - n, -1], {n, 1, 32}] (* Peter Luschny, Aug 17 2021 *)
  • PARI
    {a(n) = if( n<0, 0, n! * polcoeff( 2*x / (1 + exp(x + x * O(x^n))), n))}; /* Michael Somos, Jul 23 2005 */
    
  • PARI
    /* From o.g.f. (Paul D. Hanna, Aug 03 2014): */
    {a(n)=local(A=1); A=x*sum(m=0, n, m!*(-x)^m/(1-m*x)/prod(k=1,m,1 - k*x +x*O(x^n))); polcoeff(A, n)}
    for(n=1, 32, print1(a(n), ", "))
    
  • Python
    from sympy import bernoulli
    def A036968(n): return (2-(2<Chai Wah Wu, Apr 14 2023
  • Sage
    # with a(1) = -1
    [z*zeta(1-z)*(2^(z+1)-2) for z in (1..32)]  # Peter Luschny, Jun 28 2013
    
  • Sage
    def A036968_list(len):
        e, f, R, C = 4, 1, [], [1]+[0]*(len-1)
        for n in (2..len-1):
            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((2-e)*f*C[0])
            f *= n; e *= 2
        return R
    print(A036968_list(34)) # Peter Luschny, Feb 22 2016
    

Formula

E.g.f.: 2*x/(exp(x)+1).
a(n) = 2*(1-2^n)*B_n (B = Bernoulli numbers). - Benoit Cloitre, Oct 26 2003
2*x/(exp(x)+1) = x + Sum_{n>=1} x^(2*n)*G_{2*n}/(2*n)!.
a(n) = Sum_{k=0..n-1} binomial(n,k) 2^k*B(k). - Peter Luschny, Apr 30 2009
From Sergei N. Gladkovskii, Dec 12 2012 to Nov 23 2013: (Start) Continued fractions:
E.g.f.: 2*x/(exp(x)+1) = x - x^2/2*G(0) where G(k) = 1 - x^2/(x^2 + 4*(2*k+1)*(2*k+3)/G(k+1)).
E.g.f.: 2/(E(0)+1) where E(k) = 1 + x/(2*k+1 - x*(2*k+1)/(x + (2*k+2)/E(k+1))).
G.f.: 2 - 1/G(0) where G(k) = 1 - x*(k+1)/(1 + x*(k+1)/(1 - x*(k+1)/(1 + x*(k+1)/G(k+1)))).
E.g.f.: 2*x/(1 + exp(x)) = 2*x-2 - 2*T(0), where T(k) = 4*k-1 + x/(2 - x/( 4*k+1 + x/(2 - x/T(k+1)))).
G.f.: 2 - Q(0)/(1-x+x^2) where Q(k) = 1 - x^4*(k+1)^4/(x^4*(k+1)^4 - (1 - x + x^2 + 2*x^2*k*(k+1))*(1 - x + x^2 + 2*x^2*(k+1)*(k+2))/Q(k+1)). (End)
a(n) = n*zeta(1-n)*(2^(n+1)-2) for n > 1. - Peter Luschny, Jun 28 2013
O.g.f.: x*Sum_{n>=0} n! * (-x)^n / (1 - n*x) / Product_{k=1..n} (1 - k*x). - Paul D. Hanna, Aug 03 2014
Sum_{n>=1} 1/a(2*n) = A321595. - Amiram Eldar, May 07 2021
a(n) = (-1)^n*2*n*PolyLog(1 - n, -1). - Peter Luschny, Aug 17 2021

A005990 a(n) = (n-1)*(n+1)!/6.

Original entry on oeis.org

0, 1, 8, 60, 480, 4200, 40320, 423360, 4838400, 59875200, 798336000, 11416204800, 174356582400, 2833294464000, 48819843072000, 889218570240000, 17072996548608000, 344661117825024000, 7298706024529920000, 161787983543746560000
Offset: 1

Views

Author

Keywords

Comments

Coefficients of Gandhi polynomials.
a(n) = Sum_{pi in Symm(n)} Sum_{i=1..n} max(pi(i)-i,0), i.e., the total positive displacement of all letters in all permutations on n letters. - Franklin T. Adams-Watters, Oct 25 2006
a(n) is also the sum of the excedances of all permutations of [n]. An excedance of a permutation p of [n] is an i (1 <= i <= n-1) such that p(i) > i. Proof: i is an excedance if p(i) = i+1, i+2, ..., n (n-i possibilities), with the remaining values of p forming any permutation of [n]\{p(i)} in the positions [n]\{i} ((n-1)! possibilities). Summation of i(n-i)(n-1)! over i from 1 to n-1 completes the proof. Example: a(3)=8 because the permutations 123, 132, 213, 231, 312, 321 have excedances NONE, {2}, {1}, {1,2}, {1}, {1}, respectively. - Emeric Deutsch, Oct 26 2008
a(n) is also the number of doubledescents in all permutations of {1,2,...,n-1}. We say that i is a doubledescent of a permutation p if p(i) > p(i+1) > p(i+2). Example: a(3)=8 because each of the permutations 1432, 4312, 4213, 2431, 3214, 3421 has one doubledescent, the permutation 4321 has two doubledescents and the remaining 17 permutations of {1,2,3,4} have no doubledescents. - Emeric Deutsch, Jul 26 2009
Equals the second right hand column of A167568 divided by 2. - Johannes W. Meijer, Nov 12 2009
Half of sum of abs(p(i+1) - p(i)) over all permutations on n, e.g., 42531 = 2 + 3 + 2 + 2 = 9, and the total over all permutations on {1,2,3,4,5} is 960. - Jon Perry, May 24 2013
a(n) gives the number of non-occupied corners in tree-like tableaux of size n+1 (see Gao et al. link). - Michel Marcus, Nov 18 2015
a(n) is the number of sequences of n+2 balls colored with at most n colors such that exactly three balls are the same color as some other ball in the sequence. - Jeremy Dover, Sep 26 2017
a(n) is the number of triangles (3-cycles) in the (n+1)-alternating group graph. - Eric W. Weisstein, Jun 09 2019

References

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

Crossrefs

Programs

  • Magma
    [(n-1)*Factorial(n+1)/6: n in [1..25]]; // Vincenzo Librandi, Oct 11 2011
    
  • Maple
    [ seq((n-1)*(n+1)!/6,n=1..40) ];
    a:=n->sum(sum(sum(n!/6, j=1..n),k=-1..n),m=0..n): seq(a(n), n=0..19); # Zerinvary Lajos, May 11 2007
    seq(sum(mul(j,j=3..n), k=3..n)/3, n=2..21); # Zerinvary Lajos, Jun 01 2007
    restart: G(x):=x^3/(1-x)^2: f[0]:=G(x): for n from 1 to 21 do f[n]:=diff(f[n-1],x) od: x:=0: seq(f[n]/3!,n=2..21); # Zerinvary Lajos, Apr 01 2009
  • Mathematica
    Table[Sum[n!/6, {i, 3, n}], {n, 2, 21}] (* Zerinvary Lajos, Jul 12 2009 *)
    Table[(n - 1) (n + 1)!/6, {n, 20}] (* Harvey P. Dale, Apr 07 2019 *)
    Table[(n - 1) Pochhammer[4, n - 2], {n, 20}] (* Eric W. Weisstein, Jun 09 2019 *)
    Table[(n - 1) Gamma[n + 2]/6, {n, 20}] (* Eric W. Weisstein, Jun 09 2019 *)
    Range[0, 20]! CoefficientList[Series[x/(1 - x)^4, {x, 0, 20}], x] (* Eric W. Weisstein, Jun 09 2019 *)
  • PARI
    a(n)=(n-1)*(n+1)!/6 \\ Charles R Greathouse IV, May 24 2013

Formula

a(n) = A090672(n)/2.
a(n) = A052571(n+2)/6. - Zerinvary Lajos, May 11 2007
a(n) = Sum_{m=0..n} Sum_{k=-1..n} Sum_{j=1..n} n!/6, n >= 0. - Zerinvary Lajos, May 11 2007
If we define f(n,i,x) = Sum_{k=i..n} (Sum_{j=i..k} binomial(k,j)*Stirling1(n,k)*Stirling2(j,i)*x^(k-j)) then a(n+1) = (-1)^(n-1)*f(n,1,-4), (n >= 1). - Milan Janjic, Mar 01 2009
E.g.f.: (-1+3*x)/(3!*(1-x)^3), a(0) = -1/3!. Such e.g.f. computations resulted from e-mail exchange with Gary Detlefs. - Wolfdieter Lang, May 27 2010
a(n) = ((n+3)!/2) * Sum_{j=i..k} (k+1)!/(k+3)!, with offset 0. - Gary Detlefs, Aug 05 2010
a(n) = (n+2)!*Sum_{k=1..n-1} 1/((2*k+4)*(k+3)). - Gary Detlefs, Oct 09 2011
a(n) = (n+2)!*(1 + 3*(H(n+1) - H(n+2)))/6, where H(n) is the n-th harmonic number. - Gary Detlefs, Oct 09 2011
With offset = 0, e.g.f.: x/(1-x)^4. - Geoffrey Critzer, Aug 30 2013
From Amiram Eldar, May 06 2022: (Start)
Sum_{n>=2} 1/a(n) = 3*(Ei(1) - gamma) - 6*e + 27/2, where Ei(1) = A091725, gamma = A001620, and e = A001113.
Sum_{n>=2} (-1)^n/a(n) = 3*(gamma - Ei(-1)) - 3/2, where Ei(-1) = -A099285. (End)

Extensions

Better definition from Robert Newstedt

A052882 A simple grammar: rooted ordered set partitions.

Original entry on oeis.org

0, 1, 2, 9, 52, 375, 3246, 32781, 378344, 4912515, 70872610, 1124723193, 19471590876, 365190378735, 7376016877334, 159620144556645, 3684531055645648, 90366129593683035, 2346673806524446218, 64325158601880061137, 1856031746386568222660, 56231443721132068265415
Offset: 0

Views

Author

encyclopedia(AT)pommard.inria.fr, Jan 25 2000

Keywords

Comments

Recurrence (see Mathematica line) is similar to that for Genocchi numbers A001469. - Wouter Meeussen, Jan 09 2001
Stirling transform of A024167(n) = [ 1, 1, 5, 14, 94, ...] is a(n) = [ 1, 2, 9, 52, 375, ...]. Stirling transform of a(n) = [ 0, 2, 9, 52, 375, ...] is A087301(n+1) = [ 0, 2, 3, 20, ...]. - Michael Somos, Mar 04 2004
Starting with offset 1 = the right border of triangle A208744. - Gary W. Adamson, Mar 05 2012
a(n) is the number of ordered set partitions of {1,2,...,n} such that the first block is a singleton. - Geoffrey Critzer, Jul 22 2013
Ramanujan gives a method of finding a continued fraction of the solution x of an equation 1 = x + a2*x^2 + ... and uses log(2) as the solution of 1 = x + x^2/2 + x^3/6 + ... as an example giving the sequence of simplified convergents as 0/1, 1/1, 2/3, 9/13, 52/75, 375/541, ... of which the sequence of numerators is this sequence while A000670 is the denominators. - Michael Somos, Jun 19 2015

Examples

			G.f. = x + 2*x^2 + 9*x^3 + 52*x^4 + 375*x^5 + 3246*x^6 + 32781*x^7 + ...
		

References

  • S. Ramanujan, Notebooks, Tata Institute of Fundamental Research, Bombay 1957 Vol. 1, see page 19.

Crossrefs

Programs

  • Maple
    spec := [S,{C=Sequence(B),B=Set(Z,1 <= card),S=Prod(Z,C)},labeled]: seq(combstruct[count](spec,size=n), n=0..20);
    with(combinat): a:=n-> add(add(add((-1)^(k-i)*binomial(k, i)*i^(n-1), i=0..n-1), k=0..n-1), m=0..n-1): seq(a(n), n=0..20); # Zerinvary Lajos, Jun 03 2007
    # next Maple program:
    b:= proc(n, k) option remember;
         `if`(n<1, k!, k*b(n-1, k)+b(n-1, k+1))
        end:
    a:= n-> b(n-1, 0)*n:
    seq(a(n), n=0..25);  # Alois P. Heinz, Apr 15 2023
  • Mathematica
    a[1] := 1; a[n_] := a[n]=Sum[ Binomial[n, m] a[ n-m], {m, 1, n-1}]
    Range[0, 30]!* CoefficientList[Series[x/(2 - Exp[x]),{x, 0, 30}], x] (* Vincenzo Librandi, Dec 06 2012 *)
    a[ n_] := If[ n < 2, Boole[n == 1], n PolyLog[ 1 - n, 1/2] / 2]; (* Michael Somos, Jun 19 2015 *)
    a[ n_] := If[ n < 0, 0, n! SeriesCoefficient[ x / (2 - Exp@x), {x, 0, n}]]; (* Michael Somos, Jun 19 2015 *)
    Fubini[n_, r_] := Sum[k!*Sum[(-1)^(i+k+r)*(i+r)^(n-r)/(i!*(k-i-r)!), {i, 0, k-r}], {k, r, n}]; Fubini[0, 1] = 1; a[n_] := n*Fubini[n-1, 1]; Table[ a[n], {n, 0, 18}] (* Jean-François Alcover, Mar 30 2016 *)
  • PARI
    {a(n) = if( n<0, 0, n! * polcoeff( subst( x / (1 - y), y, exp(x + x*O(x^n)) - 1), n))};
    
  • Python
    from math import factorial
    from sympy.functions.combinatorial.numbers import stirling
    def A052882(n): return n*sum(factorial(k)*stirling(n-1,k) for k in range(n)) # Chai Wah Wu, Apr 15 2023

Formula

E.g.f.: x / (2 - exp(x)).
a(n) = n * A000670(n-1) if n>0.
a(n) = (1/2)*sum(k=0, n-1, B_k*A000629(k)*binomial(n, k)) where B_k is the k-th Bernoulli number. - Benoit Cloitre, Oct 19 2005
a(n) ~ n!/(2*(log(2))^n). - Vaclav Kotesovec, Aug 09 2013
a(0) = 0, a(1) = 1; a(n) = n! * [x^n] exp(x)*Sum_{k=1..n-1} a(k)*x^k/k!. - Ilya Gutkovskiy, Oct 17 2017

A036969 Triangle read by rows: T(n,k) = T(n-1,k-1) + k^2*T(n-1,k), 1 < k <= n, T(n,1) = 1.

Original entry on oeis.org

1, 1, 1, 1, 5, 1, 1, 21, 14, 1, 1, 85, 147, 30, 1, 1, 341, 1408, 627, 55, 1, 1, 1365, 13013, 11440, 2002, 91, 1, 1, 5461, 118482, 196053, 61490, 5278, 140, 1, 1, 21845, 1071799, 3255330, 1733303, 251498, 12138, 204, 1, 1, 87381, 9668036, 53157079, 46587905
Offset: 1

Views

Author

Keywords

Comments

Or, triangle of central factorial numbers T(2n,2k) (in Riordan's notation).
Can be used to calculate the Bernoulli numbers via the formula B_2n = (1/2)*Sum_{k = 1..n} (-1)^(k+1)*(k-1)!*k!*T(n,k)/(2*k+1). E.g., n = 1: B_2 = (1/2)*1/3 = 1/6. n = 2: B_4 = (1/2)*(1/3 - 2/5) = -1/30. n = 3: B_6 = (1/2)*(1/3 - 2*5/5 + 2*6/7) = 1/42. - Philippe Deléham, Nov 13 2003
From Peter Bala, Sep 27 2012: (Start)
Generalized Stirling numbers of the second kind. T(n,k) is equal to the number of partitions of the set {1,1',2,2',...,n,n'} into k disjoint nonempty subsets V1,...,Vk such that, for each 1 <= j <= k, if i is the least integer such that either i or i' belongs to Vj then {i,i'} is a subset of Vj. An example is given below.
Thus T(n,k) may be thought of as a two-colored Stirling number of the second kind. See Matsumoto and Novak, who also give another combinatorial interpretation of these numbers. (End)

Examples

			Triangle begins:
  1;
  1,    1;
  1,    5,      1;
  1,   21,     14,      1;
  1,   85,    147,     30,     1;
  1,  341,   1408,    627,    55,    1;
  1, 1365,  13013,  11440,  2002,   91,   1;
  1, 5461, 118482, 196053, 61490, 5278, 140, 1;
  ...
T(3,2) = 5: The five set partitions into two sets are {1,1',2,2'}{3,3'}, {1,1',3,3'}{2,2'}, {1,1'}{2,2',3,3'}, {1,1',3}{2,2',3'} and {1,1',3'}{2,2',3}.
		

References

  • L. Carlitz, A conjecture concerning Genocchi numbers. Norske Vid. Selsk. Skr. (Trondheim) 1971, no. 9, 4 pp. [The triangle appears on page 2.]
  • J. Riordan, Combinatorial Identities, Wiley, 1968, p. 217.
  • R. P. Stanley, Enumerative Combinatorics, Cambridge, Vol. 2, 1999; see Problem 5.8.

Crossrefs

Columns are A002450, A002451.
Diagonals are A000330 and A060493.
Transpose of A008957.
(0,0)-based version: A269945.
Cf. A008955, A008956, A156289, A135920 (row sums), A204579 (inverse), A000290.

Programs

  • Haskell
    a036969 n k = a036969_tabl !! (n-1) (k-1)
    a036969_row n = a036969_tabl !! (n-1)
    a036969_tabl = iterate f [1] where
       f row = zipWith (+)
         ([0] ++ row) (zipWith (*) (tail a000290_list) (row ++ [0]))
    -- Reinhard Zumkeller, Feb 18 2013
  • Maple
    A036969 := proc(n,k) local j; 2*add(j^(2*n)*(-1)^(k-j)/((k-j)!*(k+j)!),j=1..k); end;
  • Mathematica
    t[n_, k_] := 2*Sum[j^(2*n)*(-1)^(k-j)/((k-j)!*(k+j)!), {j, 1, k}]; Flatten[ Table[t[n, k], {n, 1, 10}, {k, 1, n}]] (* Jean-François Alcover, Oct 11 2011 *)
    t1[n_, k_] := (1/(2 k)!) * Sum[Binomial[2 k, j]*(-1)^j*(k - j)^(2 n), {j, 0, 2 k}]; Column[Table[t1[n, k], {n, 1, 10}, {k, 1, n}]] (* Kolosov Petro ,Jul 26 2023 *)
  • PARI
    T(n,k)=if(1M. F. Hasler, Feb 03 2012
    
  • PARI
    T(n,k)=2*sum(j=1,k,(-1)^(k-j)*j^(2*n)/(k-j)!/(k+j)!)  \\ M. F. Hasler, Feb 03 2012
    
  • Sage
    def A036969(n,k) : return (2/factorial(2*k))*add((-1)^j*binomial(2*k,j)*(k-j)^(2*n) for j in (0..k))
    for n in (1..7) : print([A036969(n,k) for k in (1..n)]) # Peter Luschny, Feb 03 2012
    

Formula

T(n,k) = A156289(n,k)/A001147(k). - Peter Bala, Feb 21 2011
From Peter Bala, Oct 14 2011: (Start)
O.g.f.: Sum_{n >= 1} x^n*t^n/Product_{k = 1..n} (1 - k^2*t^2) = x*t + (x + x^2)*t^2 + (x + 5*x^2 + x^3)*t^3 + ....
Define polynomials x^[2*n] = Product_{k = 0..n-1} (x^2 - k^2). This triangle gives the coefficients in the expansion of the monomials x^(2*n) as a linear combination of x^[2*m], 1 <= m <= n. For example, row 4 gives x^8 = x^[2] + 21*x^[4] + 14*x^[6] + x^[8].
A008955 is a signed version of the inverse.
The n-th row sum = A135920(n). (End)
T(n,k) = (2/(2*k)!)*Sum_{j=0..k-1} (-1)^(j+k+1) * binomial(2*k,j+k+1) * (j+1)^(2*n). This formula is valid for n >= 0 and 0 <= k <= n. - Peter Luschny, Feb 03 2012
From Peter Bala, Sep 27 2012: (Start)
Let E(x) = cosh(sqrt(2*x)) = Sum_{n >= 0} x^n/((2*n)!/2^n). A generating function for the triangle is E(t*(E(x)-1)) = 1 + t*x + t*(1 + t)*x^2/6 + t*(1 + 5*t + t^2)*x^3/90 + ..., where the sequence of denominators [1, 1, 6, 90, ...] is given by (2*n)!/2^n. Cf. A008277 which has generating function exp(t*(exp(x)-1)). An e.g.f. is E(t*(E(x^2/2)-1)) = 1 + t*x^2/2! + t*(1 + t)*x^4/4! + t*(1 + 5*t + t^2)*x^6/6! + ....
Put c(n) := (2*n)!/2^n. The column k generating function is (1/c(k))*(E(x)-1)^k = Sum_{n >= k} T(n,k)*x^n/c(n). The inverse array is A204579.
The production array begins:
1, 1;
0, 4, 1;
0, 0, 9, 1;
0, 0, 0, 16, 1;
... (End)
x^n = Sum_{k=1..n} T(n,k)*Product_{i=0..k-1} (x-i^2), see Stanley link. - Michel Marcus, Nov 19 2014; corrected by Kolosov Petro, Jul 26 2023
From Kolosov Petro, Jul 26 2023: (Start)
T(n,k) = (1/(2*k)!) * Sum_{j=0..2k} binomial(2k, j)*(-1)^j*(k - j)^(2n).
T(n,k) = (1/(k*(2k-1)!)) * Sum_{j=0..k} (-1)^(k-j)*binomial(2k, k-j)*j^(2n). (End)

Extensions

More terms from Vladeta Jovovic, Apr 16 2000

A036970 Triangle of coefficients of Gandhi polynomials.

Original entry on oeis.org

1, 1, 2, 3, 8, 6, 17, 54, 60, 24, 155, 556, 762, 480, 120, 2073, 8146, 12840, 10248, 4200, 720, 38227, 161424, 282078, 263040, 139440, 40320, 5040, 929569, 4163438, 7886580, 8240952, 5170800, 1965600, 423360, 40320, 28820619, 135634292
Offset: 1

Views

Author

Keywords

Comments

Another version of triangle T(n,k), 0 <= k <= n, read by rows; given by [0, 1, 2, 4, 6, 9, 12, 16, 20, ...] DELTA [1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, ...] = 1; 0, 1; 0, 1, 2; 0, 3, 8, 6; 0, 17, 54, 60, 24; ... where DELTA is the operator defined in A084938. - Philippe Deléham, Jun 07 2004

Examples

			Triangle begins:
    1;
    1,   2;
    3,   8,   6;
   17,  54,  60,  24;
  155, 556, 762, 480, 120;
  ...
		

Crossrefs

First 2 columns are Genocchi numbers A001469, A005440, row sums are also A001469.

Programs

  • Maple
    B[1]:= X -> X^2:
    for n from 2 to 12 do B[n]:= unapply(expand(X^2*(B[n-1](X+1)-B[n-1](X))),X) od:
    seq(seq(coeff(B[i](X),X,1+j),j=1..i),i=1..12); # Robert Israel, Apr 21 2016
  • Mathematica
    B[1][X_] = X^2;
    B[n_][X_] := B[n][X] = X^2*(B[n-1][X+1] - B[n-1][X]) // Simplify;
    Table[Coefficient[B[i][X], X, j+1], {i, 1, 12}, {j, 1, i}] // Flatten (* Jean-François Alcover, Sep 19 2018, from Maple *)

Formula

Let B(X, n) = X^2 (B(X+1, n-1) - B(X, n-1)), B(X, 1) = X^2; then the (i, j)-th entry in the table is the coefficient of X^(1+j) in B(X, i). - Mike Domaratzki (mdomaratzki(AT)alumni.uwaterloo.ca), Nov 17 2001
From Gary W. Adamson, Jul 19 2011: (Start)
n-th row = top row of M^(n-1), M = an infinite square matrix in which the first "1" and right border of 1's of Pascal's triangle are deleted, as follows:
1, 2, 0, 0, 0, 0, ...
1, 3, 3, 0, 0, 0, ...
1, 4, 6, 4, 0, 0, ...
1, 5, 10, 10, 5, 0, ...
1, 6, 15, 20, 15, 6, ...
...
(End)
Let G(n,x) = (-1)^(n+1)*B(-x,n). Then G(n,x) = (2*x/(x+1))*( 1 + 2^(2*n+1)*(x-1)/(x+2) + 3^(2*n+1)*(x-1)*(x-2)/((x+2)*(x+3)) + ... ). Cf. A083061. - Peter Bala, Feb 04 2019

Extensions

More terms from David W. Wilson, Jan 12 2001
Showing 1-10 of 75 results. Next