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

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

Original entry on oeis.org

1, -1, 2, -2, 8, 8, 112, 656, 5504, 49024, 491264, 5401856, 64826368, 842734592, 11798300672, 176974477312, 2831591702528, 48137058811904, 866467058876416, 16462874118127616, 329257482363600896, 6914407129633521664, 152116956851941670912
Offset: 0

Views

Author

Keywords

Comments

A010843, A000023, A000166, A000142, A000522, A010842, A053486, A053487 are successive binomial transforms with the e.g.f. exp(k*x)/(1-x) and recurrence b(n) = n*b(n-1)+k^n and are related to incomplete gamma functions at k. In this case k=-2, a(n) = n*a(n-1)+(-2)^n = Gamma(n+1,k)*exp(k) = Sum_{i=0..n} (-1)^(n-i)*binomial(n,i)*i^(n-i)*(i+k)^i. - Vladeta Jovovic, Aug 19 2002
a(n) is the permanent of the n X n matrix with -1's on the diagonal and 1's elsewhere. - Philippe Deléham, Dec 15 2003

Examples

			G.f. = 1 - x + 2*x^2 - 2*x^3 + 8*x^4 + 8*x^5 + 112*x^6 + 656*x^7 + ... - _Michael Somos_, Nov 20 2018
		

References

  • J. Riordan, An Introduction to Combinatorial Analysis, Wiley, 1958, p. 210.
  • 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

Programs

  • Haskell
    a000023 n = foldl g 1 [1..n]
      where g n m = n*m + (-2)^m
    -- James Spahlinger, Oct 08 2012
    
  • Maple
    a := n -> n!*add(((-2)^k/k!), k=0..n): seq(a(n), n=0..27); # Zerinvary Lajos, Jun 22 2007
    seq(simplify(KummerU(-n, -n, -2)), n = 0..22); # Peter Luschny, May 10 2022
  • Mathematica
    FoldList[#1*#2 + (-2)^#2 &, 1, Range[22]] (* Robert G. Wilson v, Jul 07 2012 *)
    With[{r = Round[n!/E^2 - (-2)^(n + 1)/(n + 1)]}, r - (-1)^n Mod[(-1)^n r, 2^(n + Ceiling[-(2/n) - Log[2, n]])]] (* Stan Wagon May 02 2016 *)
    a[n_] := (-1)^n x D[1/x Exp[x], {x, n}] x^n Exp[-x]
    Table[a[n] /. x -> 2, {n, 0, 22}](* Gerry Martens , May 05 2016 *)
  • PARI
    a(n)=if(n<0,0,n!*polcoeff(exp(-2*x+x*O(x^n))/(1-x),n))
    
  • PARI
    my(x='x+O('x^66)); Vec( serlaplace( exp(-2*x)/(1-x)) ) \\ Joerg Arndt, Oct 06 2013
    
  • Python
    from sympy import exp, uppergamma
    def A000023(n):
        return exp(-2) * uppergamma(n + 1, -2)  # David Radcliffe, Aug 20 2025
  • Sage
    @CachedFunction
    def A000023(n):
        if n == 0: return 1
        return n * A000023(n-1) + (-2)**n
    [A000023(i) for i in range(23)]   # Peter Luschny, Oct 17 2012
    

Formula

a(n) = Sum_{k=0..n} A008290(n,k)*(-1)^k. - Philippe Deléham, Dec 15 2003
a(n) = Sum_{k=0..n} (-2)^(n-k)*n!/(n-k)! = Sum_{k=0..n} binomial(n, k)*k!*(-2)^(n-k). - Paul Barry, Aug 26 2004
a(n) = exp(-2)*Gamma(n+1,-2) (incomplete Gamma function). - Mark van Hoeij, Nov 11 2009
a(n) = b such that (-1)^n*Integral_{x=0..2} x^n*exp(x) dx = c + b*exp(2). - Francesco Daddi, Aug 01 2011
G.f.: hypergeom([1,k],[],x/(1+2*x))/(1+2*x) with k=1,2,3 is the generating function for A000023, A087981, and A052124. - Mark van Hoeij, Nov 08 2011
D-finite with recurrence: - a(n) + (n-2)*a(n-1) + 2*(n-1)*a(n-2) = 0. - R. J. Mathar, Nov 14 2011
E.g.f.: 1/E(0) where E(k) = 1 - x/(1-2/(2-(k+1)/E(k+1))); (continued fraction). - Sergei N. Gladkovskii, Nov 21 2011
G.f.: 1/Q(0), where Q(k) = 1 + 2*x - x*(k+1)/(1 - x*(k+1)/Q(k+1)); (continued fraction). - Sergei N. Gladkovskii, Apr 19 2013
G.f.: 1/Q(0), where Q(k) = 1 - x*(2*k-1) - x^2*(k+1)^2/Q(k+1); (continued fraction). - Sergei N. Gladkovskii, Sep 30 2013
a(n) = Sum_{k=0..n} (-1)^(n+k)*binomial(n, k)*!k, where !k is the subfactorial A000166. a(n) = (-2)^n*hypergeom([1, -n], [], 1/2). - Vladimir Reshetnikov, Oct 18 2015
For n >= 3, a(n) = r - (-1)^n mod((-1)^n r, 2^(n - floor((2/n) + log_2(n)))) where r = {n! * e^(-2) - (-2)^(n+1)/(n+1)}. - Stan Wagon, May 02 2016
0 = +a(n)*(+4*a(n+1) -2*a(n+3)) + a(n+1)*(+4*a(n+1) +3*a(n+2) -a(n+3)) +a(n+2)*(+a(n+2)) if n>=0. - Michael Somos, Nov 20 2018
a(n) = KummerU(-n, -n, -2). - Peter Luschny, May 10 2022

A052127 Sum_{n >= 0} a(n) * x^n / n!^2 = exp(-2*x)/(1-x)^3.

Original entry on oeis.org

1, 1, 8, 96, 2112, 68160, 3087360, 185633280, 14301020160, 1372232171520, 160390869811200, 22426206024499200, 3695148753459609600, 708443854690399027200, 156340439420689081958400, 39342248735234589720576000, 11197266840049016358567936000
Offset: 0

Views

Author

N. J. A. Sloane, Jan 23 2000

Keywords

Comments

As described in the Stanley reference, this sequence gives the expectation of the fourth moment of a random sign matrix (a matrix whose entries are independently set equal to -1 or 1 with equal probability) of size n. For large n, a(n) is asymptotic to (n!)^2*(n^2+7n+10)/(2e^2). - Kevin P. Costello (kcostell(AT)gmail.com), Oct 22 2007

References

  • R. P. Stanley, Enumerative Combinatorics, Cambridge, Vol. 2, 1999; see Problem 5.64(b).
  • G. Szekeres, The average value of skew Hadamard matrices, Proceedings of the First Australian Conference on Combinatorial Mathematics (Univ. Newcastle, Newcastle, 1972), pp. 55--59. Univ. of Newcastle Res. Associates, Newcastle, 1972. MR0349708 (50 #2201). This is S_4(n).

Crossrefs

Programs

  • PARI
    my(x='x+O('x^30), v = Vec(serlaplace( exp(-2*x)/(1-x)^3))); vector(#v, k, v[k]*(k-1)!) \\ Michel Marcus, Oct 25 2021
    
  • Python
    from math import factorial
    from fractions import Fraction
    def A052127(n): return int((n+5)*(n+2)*factorial(n)**2*sum(Fraction((-1 if k&1 else 1)*(k+3)<Chai Wah Wu, Apr 20 2023

Formula

a(n) = (n!)^2*A209429(n)/A209430(n). [Szekeres]
a(n) = n! * A052124(n). - Sean A. Irvine, Oct 25 2021

A383381 Expansion of e.g.f. exp(-2*x) / (1-x)^5.

Original entry on oeis.org

1, 3, 14, 82, 576, 4688, 43264, 445632, 5062016, 62812288, 844863744, 12239474432, 189939644416, 3142842052608, 55223903596544, 1026805938614272, 20139224002953216, 415503046091767808, 8994794537935765504, 203848794955954716672, 4826475681472562855936, 119162892472107134353408
Offset: 0

Views

Author

Seiichi Manyama, Apr 24 2025

Keywords

Crossrefs

Programs

  • PARI
    my(N=30, x='x+O('x^N)); Vec(serlaplace(exp(-2*x)/(1-x)^5))

Formula

a(n) = n! * Sum_{k=0..n} (-2)^(n-k) * binomial(k+4,4)/(n-k)!.
a(0) = 1, a(1) = 3; a(n) = (n+2)*a(n-1) + 2*(n-1)*a(n-2).
a(n) ~ sqrt(2*Pi) * n^(n + 9/2) / (24*exp(n+2)). - Vaclav Kotesovec, Apr 25 2025

A082031 Expansion of e.g.f. exp(2*x)/(1-x)^3.

Original entry on oeis.org

1, 5, 28, 176, 1240, 9752, 85120, 819296, 8639872, 99209600, 1233416704, 16517058560, 237137769472, 3634932675584, 59263206154240, 1024222802014208, 18706559855656960, 360062627304341504, 7285354765603176448
Offset: 0

Views

Author

Paul Barry, Apr 02 2003

Keywords

Comments

Binomial transform of A082030

Crossrefs

Programs

  • Mathematica
    With[{nn=20},CoefficientList[Series[Exp[2x]/(1-x)^3,{x,0,nn}],x] Range[0,nn]!] (* Harvey P. Dale, Apr 28 2013 *)

Formula

E.g.f.: exp(2*x)/(1-x)^3.
Conjecture: a(n) +(-n-4)*a(n-1) +2*(n-1)*a(n-2)=0. - R. J. Mathar, Nov 24 2012
From Peter Bala, Sep 20 2013: (Start)
a(n) = (1/2)*( Sum_{k = 0..n} (k+2)!*binomial(n,k)*2^(n-k) ).
Based on this series the ZeilbergerRecurrence command in Maple 17 produces the first-order recurrence (n^2 - 3*n + 4)*a(n) = 2^(n+2) + n*(n^2 - n + 2)*a(n-1). Using this it is easy to verify the second-order recurrence conjectured above by Mathar.
The sequence b(n) := n!*(1 + n*(n-1)/2) = n!*A000124(n-1) also satisfies Mathar's recurrence equation but with starting values b(0) = b(1) = 1. This yields the finite continued fraction expansion a(n)/b(n) = 1/(1 - 4/(5 - 2/(6 - 4/(7 - ... - (2*n - 2)/(n + 4) )))), valid for n >= 2.
Lim_{n -> infinity} a(n)/b(n) = e^2 = 1/(1 - 4/(5 - 2/(6 - 4/(7 - ... - (2*n - 2)/(n + 4 - ...))))).
It can be shown that a(n+1)/b(n+1) = 1 + 16*( Sum_{k = 0..n} 2^k/((k + 1)!*(k^4 + 3*k^2 + 4)) ). Taking the limit gives the series acceleration result e^2 = 1 + 16*( Sum_{k = 0..infinity} 2^k/((k+1)!*(k^4 + 3*k^2 + 4)) ). Cf. A082030 and A052124. (End)

A383341 Square array A(n,k), n >= 0, k >= 0, read by antidiagonals downwards, where A(n,k) = n! * Sum_{j=0..n} (-k)^(n-j) * binomial(j+k,j)/(n-j)!.

Original entry on oeis.org

1, 1, 1, 1, 1, 2, 1, 1, 3, 6, 1, 1, 4, 11, 24, 1, 1, 5, 16, 53, 120, 1, 1, 6, 21, 88, 309, 720, 1, 1, 7, 26, 129, 568, 2119, 5040, 1, 1, 8, 31, 176, 897, 4288, 16687, 40320, 1, 1, 9, 36, 229, 1296, 7317, 36832, 148329, 362880, 1, 1, 10, 41, 288, 1765, 11296, 67365, 354688, 1468457, 3628800
Offset: 0

Views

Author

Seiichi Manyama, Apr 24 2025

Keywords

Examples

			Square array begins:
    1,    1,    1,    1,     1,     1,     1, ...
    1,    1,    1,    1,     1,     1,     1, ...
    2,    3,    4,    5,     6,     7,     8, ...
    6,   11,   16,   21,    26,    31,    36, ...
   24,   53,   88,  129,   176,   229,   288, ...
  120,  309,  568,  897,  1296,  1765,  2304, ...
  720, 2119, 4288, 7317, 11296, 16315, 22464, ...
		

Crossrefs

Columns k=0..4 give A000142, A000255, A052124, A383378, A383383.
Main diagonal gives A383379.
Cf. A295181.

Programs

  • PARI
    a(n,k) = n!*sum(j=0, n, (-k)^(n-j)*binomial(j+k, j)/(n-j)!);

Formula

E.g.f. of column k: exp(-k*x) / (1-x)^(k+1).
A(0,k) = A(1,k) = 1; A(n,k) = n*A(n-1,k) + k*(n-1)*A(n-2,k).

A383380 Expansion of e.g.f. exp(-2*x) / (1-x)^4.

Original entry on oeis.org

1, 2, 8, 40, 248, 1808, 15136, 142784, 1496960, 17254144, 216740864, 2945973248, 43065951232, 673626675200, 11224114860032, 198447384666112, 3710328985124864, 73136238041563136, 1515739708283944960, 32947698735175172096, 749499782353468522496, 17806903161183314378752
Offset: 0

Views

Author

Seiichi Manyama, Apr 24 2025

Keywords

Crossrefs

Programs

  • PARI
    my(N=30, x='x+O('x^N)); Vec(serlaplace(exp(-2*x)/(1-x)^4))

Formula

E.g.f.: B(x)^2, where B(x) is the e.g.f. of A000255.
a(n) = n! * Sum_{k=0..n} (-2)^(n-k) * binomial(k+3,3)/(n-k)!.
a(0) = 1, a(1) = 2; a(n) = (n+1)*a(n-1) + 2*(n-1)*a(n-2).
a(n) ~ sqrt(Pi) * n^(n + 7/2) / (3*sqrt(2)*exp(n+2)). - Vaclav Kotesovec, Apr 25 2025
Showing 1-6 of 6 results.