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-7 of 7 results.

A001469 Genocchi numbers (of first kind); unsigned coefficients give expansion of x*tan(x/2).

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

Keywords

Comments

The Genocchi numbers satisfy Seidel's recurrence: for n>1, 0 = Sum_{j=0..[n/2]} C(n,2j)*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
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

References

  • L. Comtet, Advanced Combinatorics, Reidel, 1974, p. 49.
  • L. Euler, Institutionum Calculi Differentialis, volume 2 (1755), para. 181.
  • 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.
  • A. Genocchi, Intorno all'espressione generale de'numeri Bernulliani, Ann. Sci. Mat. Fis., 3 (1852), 395-405.
  • R. L. Graham, D. E. Knuth and O. Patashnik, Concrete Mathematics. Addison-Wesley, Reading, MA, 1990, p. 528.
  • 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).
  • R. P. Stanley, Enumerative Combinatorics, Cambridge, Vol. 2, 1999; see Problem 5.8.

Crossrefs

a(n) = -A065547(n, 1) and A065547(n+1, 2) for n >= 1.

Programs

  • Magma
    [2*(1 - 4^n) * Bernoulli(2*n): n in [1..25]]; // Vincenzo Librandi, Oct 15 2018
    
  • Maple
    A001469 := proc(n::integer) (2*n)!*coeftayl( 2*x/(exp(x)+1), x=0,2*n) end proc:
    for n from 1 to 20 do print(A001469(n)) od : # R. J. Mathar, Jun 22 2006
  • Mathematica
    a[n_] := 2*(1-4^n)*BernoulliB[2n]; Table[a[n], {n, 17}] (* Jean-François Alcover, Nov 24 2011 *)
    a[n_] := 2*n*EulerE[2*n-1, 0]; Table[a[n], {n, 17}] (* Jean-François Alcover, Jul 02 2013 *)
    Table[4 n PolyLog[1 - 2 n, -1], {n, 1, 19}] (* Peter Luschny, Aug 17 2021 *)
  • PARI
    a(n)=if(n<1,0,n*=2; 2*(1-2^n)*bernfrac(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 */
    
  • Python
    from sympy import bernoulli
    def A001469(n): return (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 A001469_list(n) :
        D = [0]*(n+2); D[1] = -1
        R = []; b = False
        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 not b : R.append(D[h])
        return R
    A001469_list(17) # Peter Luschny, Jun 29 2012
    

Formula

a(n) = 2*(1-4^n)*B_{2n} (B = Bernoulli numbers).
x*tan(x/2) = Sum_{n>=1} x^(2*n)*abs(a(n))/(2*n)! = x^2/2 + x^4/24 + x^6/240 + 17*x^8/40320 + 31*x^10/725760 + O(x^11).
E.g.f.: 2*x/(1 + exp(x)) = x + Sum_{n>=1} a(2*n)*x^(2*n)/(2*n)! = -x^2/2! + x^4/4! - 3 x^6/6! + 17 x^8/8! + ...
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..2n-1} 2^k*B(k)*binomial(2*n,k) where B(k) is the k-th Bernoulli number. - Benoit Cloitre, May 31 2003
abs(a(n)) = Sum_{k=0..2n} (-1)^(n-k+1)*Stirling2(2n, k)*A059371(k). - Vladeta Jovovic, Feb 07 2004
G.f.: -x/(1+x/(1+2x/(1+4x/(1+6x/(1+9x/(1+12x/(1+16x/(1+20x/(1+25x/(1+...(continued fraction). - Philippe Deléham, Nov 22 2011
E.g.f.: E(x) = 2*x/(exp(x)+1) = x*(1-(x^3+2*x^2)/(2*G(0)-x^3-2*x^2)); G(k) = 8*k^3 + (12+4*x)*k^2 + (4+6*x+2*x^2)*k + x^3 + 2*x^2 + 2*x - 2*(x^2)*(k+1)*(2*k+1)*(x+2*k)*(x+2*k+4)/G(k+1); (continued fraction, Euler's kind, 1-step). - Sergei N. Gladkovskii, Jan 18 2012
a(n) = (-1)^n*(2*n)!*Pi^(-2*n)*4*(1-4^(-n))*Li{2*n}(1). - Peter Luschny, Jun 29 2012
Asymptotic: abs(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+...). - Peter Luschny, Jul 24 2013
G.f.: x/(T(0)-x) -1, where T(k) = 2*x*k^2 + 4*x*k + 2*x - 1 - x*(-1+x+2*x*k+x*k^2)*(k+2)^2/T(k+1); (continued fraction). - Sergei N. Gladkovskii, Nov 17 2013
G.f.: -1 + x/(T(0)+x), where T(k) = 1 + (k+1)*(k+2)*x/(1+x*(k+2)^2/T(k+1)); (continued fraction). - Sergei N. Gladkovskii, Nov 17 2013
a(n) = 4*n*PolyLog(1 - 2*n, -1). - Peter Luschny, Aug 17 2021

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

A090238 Triangle T(n, k) read by rows. T(n, k) is the number of lists of k unlabeled permutations whose total length is n.

Original entry on oeis.org

1, 0, 1, 0, 2, 1, 0, 6, 4, 1, 0, 24, 16, 6, 1, 0, 120, 72, 30, 8, 1, 0, 720, 372, 152, 48, 10, 1, 0, 5040, 2208, 828, 272, 70, 12, 1, 0, 40320, 14976, 4968, 1576, 440, 96, 14, 1, 0, 362880, 115200, 33192, 9696, 2720, 664, 126, 16, 1, 0, 3628800, 996480, 247968, 64704, 17312, 4380, 952, 160, 18, 1
Offset: 0

Views

Author

Philippe Deléham, Jan 23 2004, Jun 14 2007

Keywords

Comments

T(n,k) is the number of lists of k unlabeled permutations whose total length is n. Unlabeled means each permutation is on an initial segment of the positive integers. Example: with dashes separating permutations, T(3,2) = 4 counts 1-12, 1-21, 12-1, 21-1. - David Callan, Nov 29 2007
For n > 0, -Sum_{i=0..n} (-1)^i*T(n,i) is the number of indecomposable permutations A003319. - Peter Luschny, Mar 13 2009
Also the convolution triangle of the factorial numbers for n >= 1. - Peter Luschny, Oct 09 2022

Examples

			Triangle begins:
  1;
  0,       1;
  0,       2,      1;
  0,       6,      4,      1;
  0,      24,     16,      6,     1;
  0,     120,     72,     30,     8,     1;
  0,     720,    372,    152,    48,    10,     1;
  0,    5040,   2208,    828,   272,    70,    12,    1;
  0,   40320,  14976,   4968,  1576,   440,    96,   14,   1;
  0,  366880, 115200,  33192,  9696,  2720,   664,  126,  16,   1;
  0, 3628800, 996480, 247968, 64704, 17312,  4380,  952, 160,  18,  1;
  ...
		

References

  • L. Comtet, Advanced Combinatorics, Reidel, 1974, p. 171, #34.

Crossrefs

Another version: A059369.
Row sums: A051296, A003319 (n>0).
Cf. A084938.

Programs

  • Maple
    T := proc(n,k) option remember; if n=0 and k=0 then return 1 fi;
    if n>0 and k=0 or k>0 and n=0 then return 0 fi;
    T(n-1,k-1)+(n+k-1)*T(n-1,k)/k end:
    for n from 0 to 10 do seq(T(n,k),k=0..n) od; # Peter Luschny, Mar 03 2016
    # Uses function PMatrix from A357368.
    PMatrix(10, factorial); # Peter Luschny, Oct 09 2022
  • Mathematica
    T[n_, k_] := T[n, k] = T[n-1, k-1] + ((n+k-1)/k)*T[n-1, k]; T[0, 0] = 1; T[, 0] = T[0, ] = 0;
    Table[T[n, k], {n, 0, 10}, {k, 0, n}] // Flatten (* Jean-François Alcover, Jun 20 2018 *)

Formula

T(n, k) is given by [0, 2, 1, 3, 2, 4, 3, 5, 4, 6, 5, 7, 6, ...] DELTA [1, 0, 0, 0, 0, 0, 0, 0, 0, ...] where DELTA is the operator defined in A084938.
T(n, k) = T(n-1, k-1) + ((n+k-1)/k)*T(n-1, k); T(0, 0)=1, T(n, 0)=0 if n > 0, T(0, k)=0 if k > 0.
G.f. for the k-th column: (Sum_{i>=1} i!*t^i)^k = Sum_{n>=k} T(n, k)*t^n.
Sum_{k=0..n} T(n, k)*binomial(m, k) = A084938(m+n, m). - Philippe Deléham, Jan 31 2004
T(n, k) = Sum_{j>=0} A090753(j)*T(n-1, k+j-1). - Philippe Deléham, Feb 18 2004
From Peter Bala, May 27 2017: (Start)
Conjectural o.g.f.: 1/(1 + t - t*F(x)) = 1 + t*x + (2*t + t^2)*x^2 + (6*t + 4*t^2 + t^3)*x^3 + ..., where F(x) = Sum_{n >= 0} n!*x^n.
If true then a continued fraction representation of the o.g.f. is 1 - t + t/(1 - x/(1 - t*x - x/(1 - 2*x/(1 - 2*x/(1 - 3*x/(1 - 3*x/(1 - 4*x/(1 - 4*x/(1 - ... ))))))))). (End)

Extensions

New name using a comment from David Callan by Peter Luschny, Sep 01 2022

A136128 Number of components in all permutations of [1,2,...,n].

Original entry on oeis.org

1, 3, 10, 40, 192, 1092, 7248, 55296, 478080, 4625280, 49524480, 581368320, 7422589440, 102372076800, 1516402944000, 24004657152000, 404347023360000, 7220327288832000, 136227009945600000, 2707657158721536000, 56546150835879936000, 1237826569587277824000
Offset: 1

Views

Author

Emeric Deutsch, Jan 21 2008

Keywords

Examples

			a(3) = 10 because the permutations of [1,2,3], with components separated by /, are 1/2/3, 1/32, 21/3, 231, 312 and 321.
		

References

  • Louis Comtet, Advanced Combinatorics, Reidel, 1974, p. 262 (#14).

Crossrefs

Programs

  • Maple
    seq(add(factorial(i)*factorial(n-i),i=0..n-1),n=1..20);
    # second Maple program:
    a:= proc(n) option remember; `if`(n<2, n,
          (a(n-1)+(n-1)!)*(n+1)/2)
        end:
    seq(a(n), n=1..23);  # Alois P. Heinz, Jun 13 2019
  • Mathematica
    nn=20; p=Sum[n!x^n,{n,0,nn}]; Drop[CoefficientList[Series[p(p-1), {x,0,nn}], x], 1] (* Geoffrey Critzer, Apr 20 2012 *)
    Table[(n + 1)! Re[-LerchPhi[2, 1, n + 1]], {n, 1, 20}]  (* Peter Luschny, Jan 04 2018 *)
  • PARI
    a(n) = 2*sum(k=0, (n+1)\2, (4^k-1)*abs(stirling(n+1, 2*k, 1))*bernfrac(2*k)); \\ Seiichi Manyama, Oct 05 2022
    
  • PARI
    a(n) = my(A = 1, B = 1); for(k=1, n, B *= k; A = (n-k+1)*A + B); A-B \\ Mikhail Kurkov, Aug 09 2025
    
  • Python
    def aList(n) -> list[int]:
        f, al, A = 1, 1, [1]
        for i in range(2, n + 1):
            f, al = f * i, (al + f) * (i + 1) >> 1
            A.append(al)
        return A
    print(aList(22))  # Peter Luschny, Aug 09 2025

Formula

a(n) = A003149(n) - n!.
a(n) = A059371(n) + n! (n>=2).
a(n) = Sum_{k=1..n} k*A059438(n,k).
a(n) = Sum_{i=0..n-1} i!*(n-i)!.
a(n) = (n+1)!*(1 + Sum_{j=1..n-1} 2^j/(j+1))/2^n.
a(n) = (n+1)*a(n-1)/2 + (n-1)!*(n+1)/2, a(1)=1.
G.f.: f(f-1), where f(x) = Sum_{j>=0} j!*x^j.
a(n) = (n + 1)!*Re(-LerchPhi(2, 1, n + 1)). - Peter Luschny, Jan 04 2018
D-finite with recurrence: 2*a(n) +(-3*n+1)*a(n-1) +(n^2-3*n+4)*a(n-2) +(n-1)*(n-2)*a(n-3)=0. - R. J. Mathar, Jul 26 2022
a(n) = 2 * Sum_{k=0..floor((n+1)/2)} (4^k-1) * |Stirling1(n+1,2*k)| * Bernoulli(2*k). - Seiichi Manyama, Oct 05 2022
E.g.f.: x/((2-x)*(1-x)) - 2*log(1-x)/((2-x)^2). - Vladimir Kruchinin, Nov 16 2022

A059369 Triangle of numbers T(n,k) = T(n-1,k-1) + ((n+k-1)/k)*T(n-1,k), n >= 1, 1 <= k <= n, with T(n,1) = n!, T(n,n) = 1; read from right to left.

Original entry on oeis.org

1, 1, 2, 1, 4, 6, 1, 6, 16, 24, 1, 8, 30, 72, 120, 1, 10, 48, 152, 372, 720, 1, 12, 70, 272, 828, 2208, 5040, 1, 14, 96, 440, 1576, 4968, 14976, 40320, 1, 16, 126, 664, 2720, 9696, 33192, 115200, 362880, 1, 18, 160, 952, 4380, 17312, 64704, 247968, 996480
Offset: 1

Views

Author

N. J. A. Sloane, Jan 28 2001

Keywords

Comments

Another version of triangle in A090238. - Philippe Deléham, Jun 14 2007

Examples

			When read from left to right the rows {T(n,k), 1 <= k <= n} for n=1,2,3,... are 1; 2,1; 6,4,1; 24,16,6,1; ...
		

References

  • L. Comtet, Advanced Combinatorics, Reidel, 1974, p. 171, #34.

Crossrefs

Programs

  • Mathematica
    nmax = 10; t[n_, k_] := Sum[(m+1)!*t[n-m-1, k-1], {m, 0, n-k}]; t[n_, 1] = n!; t[n_, n_] = 1; Flatten[ Table[ t[n, k], {n, 1, nmax}, {k, n, 1, -1}]] (* Jean-François Alcover, Nov 14 2011 *)

Formula

G.f. for k-th diagonal: (Sum_{i >= 1} i!*t^i)^k = Sum_{n >= k} T(n, k)*t^n.
T(n,k) = n! if k=1, 1 if k=n, Sum_{m=0..n-k} (m+1)!*T(n-m-1,k-1) otherwise. - Vladimir Kruchinin, Aug 18 2010

Extensions

More terms from Larry Reeves (larryr(AT)acm.org), Jan 31 2001

A305577 a(n) = Sum_{k=0..n} k!!*(n - k)!!.

Original entry on oeis.org

1, 2, 5, 10, 26, 58, 167, 414, 1324, 3606, 12729, 37674, 145578, 463770, 1944879, 6614190, 29852856, 107616150, 518782545, 1970493210, 10077228270, 40125873690, 216425656215, 899557170750, 5091758227620, 22011865939350, 130202223160905, 583641857191050, 3594820517111250
Offset: 0

Views

Author

Ilya Gutkovskiy, Jun 05 2018

Keywords

Comments

Convolution of A006882 with itself.

Crossrefs

Programs

  • Maple
    a:= proc(n) option remember; `if`(n<4, n^2+1,
          ((3*n^2-4*n-2)*a(n-2) +(n+1)*a(n-3)
           -2*a(n-1) -(n-1)^2*n*a(n-4))/(2*n-4))
        end:
    seq(a(n), n=0..35);  # Alois P. Heinz, Jun 14 2018
  • Mathematica
    Table[Sum[k!! (n - k)!!, {k, 0, n}], {n, 0, 28}]
    nmax = 28; CoefficientList[Series[Sum[k!! x^k, {k, 0, nmax}]^2, {x, 0, nmax}], x]

Formula

G.f.: (Sum_{k>=0} k!!*x^k)^2.

A357240 Expansion of e.g.f. 2 * (exp(x) - 1) / (exp(exp(x) - 1) + 1).

Original entry on oeis.org

0, 1, 0, -2, -5, -4, 32, 225, 794, 190, -22291, -200298, -920244, 924223, 65848880, 716920754, 3831260555, -13147083976, -575844827780, -7162425813919, -40755845041730, 320194436283162, 11810647258173653, 161108090793013130, 896865861205240824, -14305712791762925929, -487306962045115504436
Offset: 0

Views

Author

Ilya Gutkovskiy, Sep 19 2022

Keywords

Comments

Stirling transform of the Genocchi numbers (of first kind, A036968).

Crossrefs

Programs

  • Maple
    b:= proc(n, m) option remember; `if`(n=0, `if`(m=0, 0,
          m*euler(m-1, 0)), m*b(n-1, m)+b(n-1, m+1))
        end:
    a:= n-> b(n, 0):
    seq(a(n), n=0..26);  # Alois P. Heinz, Jun 23 2023
  • Mathematica
    nmax = 26; CoefficientList[Series[2 (Exp[x] - 1)/(Exp[Exp[x] - 1] + 1), {x, 0, nmax}], x] Range[0, nmax]!
    Table[2 Sum[StirlingS2[n, k] (1 - 2^k) BernoulliB[k], {k, 0, n}], {n, 0, 26}]
  • PARI
    a(n) = 2*sum(k=0, n, stirling(n, k, 2)*(1-2^k)*bernfrac(k)); \\ Michel Marcus, Sep 20 2022

Formula

a(n) = 2 * Sum_{k=0..n} Stirling2(n,k) * (1 - 2^k) * Bernoulli(k).
a(n) ~ Pi^(3/2) * 2^(n + 7/2) * n^(n + 1/2) * (cos(n*arctan(2*arctan(Pi)/log(1 + Pi^2))) * (Pi*log(1 + Pi^2) + 2*arctan(Pi)) + (log(1 + Pi^2) - 2*Pi*arctan(Pi)) * sin(n*arctan(2*arctan(Pi)/log(1 + Pi^2)))) / ((1 + Pi^2) * exp(n) * (4*arctan(Pi)^2 + log(1 + Pi^2)^2)^(n/2 + 1)). - Vaclav Kotesovec, Oct 04 2022
Showing 1-7 of 7 results.