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.

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

Original entry on oeis.org

1, 1, 5, 29, 233, 2329, 27949, 391285, 6260561, 112690097, 2253801941, 49583642701, 1190007424825, 30940193045449, 866325405272573, 25989762158177189, 831672389061670049, 28276861228096781665, 1017967004211484139941, 38682746160036397317757
Offset: 0

Views

Author

Keywords

Comments

a(n) is the permanent of the n X n matrix with 1's on the diagonal and 2's elsewhere. - Yuval Dekel, Nov 01 2003. Compare A157142.
Starting with offset 1 = lim_{k->infinity} M^k, where M = a tridiagonal matrix with (1,0,0,0,...) in the main diagonal, (1,3,5,7,...) in the subdiagonal and (2,4,6,8,...) in the subsubdiagonal. - Gary W. Adamson, Jan 13 2009
a(n) is also the number of (n-1)-dimensional facet derangements for the n-dimensional hypercube. - Elizabeth McMahon, Gary Gordon (mcmahone(AT)lafayette.edu), Jun 29 2009
a(n) is the number of ways to write down each n-permutation and underline some (possibly none or all) of the elements that are not fixed points. a(n) = Sum_{k=0..n} A008290(n,k)*2^(n-k). - Geoffrey Critzer, Dec 15 2012
Type B derangement numbers: the number of fixed point free permutations in the n-th hyperoctahedral group of signed permutations of {1,2,...,n}. See Chow 2006. See A000166 for type A derangement numbers. - Peter Bala, Jan 30 2015

Examples

			G.f. = 1 + x + 5*x^2 + 29*x^3 + 233*x^4 + 2329*x^5 + 27949*x^6 + 391285*x^7 + ... - _Michael Somos_, Apr 14 2018
		

References

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

Column k=2 of A320032.

Programs

  • Maple
    a := n -> (-1)^n*(1-2*n*hypergeom([1,1-n],[],2)):
    seq(simplify(a(n)), n=0..18); # Peter Luschny, May 09 2017
    a := n -> 2^n*add((n!/k!)*(-1/2)^k, k=0..n):
    seq(a(n), n=0..23); # Peter Luschny, Jan 06 2020
    seq(simplify(2^n*KummerU(-n, -n, -1/2)), n = 0..19); # Peter Luschny, May 10 2022
  • Mathematica
    FunctionExpand @ Table[ Gamma[ n+1, -1/2 ]*2^n/Exp[ 1/2 ], {n, 0, 24}]
    With[{nn=20},CoefficientList[Series[Exp[-x]/(1-2x),{x,0,nn}],x] Range[0,nn]!] (* Harvey P. Dale, Jul 22 2013 *)
    a[n_] := 2^n n! Sum[(-1)^i/(2^i i!), {i, 0, n}]; Table[a[n], {n, 0, 20}] (* Gerry Martens, May 06 2016 *)
    a[ n_] := If[ n < 1, Boole[n == 0], (2 n - 1) a[n - 1] + (2 n - 2) a[n - 2]]; (* Michael Somos, Sep 28 2017 *)
    a[ n_] := Sum[ (-1)^(n + k) Binomial[n, k] k! 2^k, {k, 0, n}]; (* Michael Somos, Apr 14 2018 *)
    a[ n_] := If[ n < 0, 0, (2^n Gamma[n + 1, -1/2]) / Sqrt[E] // FunctionExpand]; (* Michael Somos, Apr 14 2018 *)
    a[n_] := n! 2^n Hypergeometric1F1[-n, -n, -1/2];
    Table[a[n], {n, 0, 19}]   (* Peter Luschny, Jul 28 2024 *)
  • PARI
    my(x='x+O('x^66)); Vec(serlaplace(exp(-x)/(1-2*x))) \\ Joerg Arndt, Apr 15 2013
    
  • PARI
    vector(100, n, n--; sum(k=0, n, (-1)^(n+k)*binomial(n, k)*k!*2^k)) \\ Altug Alkan, Oct 30 2015
    
  • PARI
    {a(n) = if( n<1, n==0, (2*n - 1) * a(n-1) + (2*n - 2) * a(n-2))}; /* Michael Somos, Sep 28 2017 */

Formula

Inverse binomial transform of double factorials A000165. - Paul Barry, May 26 2003
a(n) = Sum_{k=0..n} (-1)^(n+k)*C(n, k)*k!*2^k. - Paul Barry, May 26 2003
a(n) = Sum_{k=0..n} A008290(n, k)*2^(n-k). - Philippe Deléham, Dec 13 2003
a(n) = 2*n*a(n-1) + (-1)^n, n > 0, a(0)=1. - Paul Barry, Aug 26 2004
D-finite with recurrence a(n) = (2*n-1)*a(n-1) + (2*n-2)*a(n-2). - Elizabeth McMahon, Gary Gordon (mcmahone(AT)lafayette.edu), Jun 29 2009
From Groux Roland, Jan 17 2011: (Start)
a(n) = (1/(2*sqrt(exp(1))))*Integral_{x>=-1} exp(-x/2)*x^n dx;
Sum_{k>=0} 1/(k!*2^(k+1)*(n+k+1)) = (-1)^n*(a(n)*sqrt(exp(1))-2^n*n!). (End)
a(n) = round(2^n*n!/exp(1/2)), x >= 0. - Simon Plouffe, Mar 1993
G.f.: 1/Q(0), where Q(k) = 1 - x*(4*k+1) - 4*x^2*(k+1)^2/Q(k+1); (continued fraction). - Sergei N. Gladkovskii, Sep 30 2013
From Peter Bala, Jan 30 2015: (Start)
a(n) = Integral_{x = 0..inf} (2*x - 1)^n*exp(-x) dx.
b(n) := 2^n*n! satisfies the recurrence b(n) = (2*n - 1)*b(n-1) + (2*n - 2)*b(n-2), the same recurrence as satisfied by a(n). This leads to the continued fraction representation a(n) = 2^n*n!*( 1/(1 + 1/(1 + 2/(3 + 4/(5 +...+ (2*n - 2)/(2*n - 1) ))))) for n >= 2, which in the limit gives the continued fraction representation sqrt(e) = 1 + 1/(1 + 2/(3 + 4/(5 + ... ))). (End)
For n > 0, a(n) = 1 + 4*Sum_{k=0..n-1} A263895(n). - Vladimir Reshetnikov, Oct 30 2015
a(n) = (-1)^n*(1-2*n*hypergeom([1,1-n],[],2)). - Peter Luschny, May 09 2017
a(n+1) >= A113012(n). - Michael Somos, Sep 28 2017
a(0) = 1; a(n) = Sum_{k=1..n} binomial(n,k) * (2*k - 1) * a(n-k). - Ilya Gutkovskiy, Jan 17 2020
a(n) = 2^n*KummerU(-n, -n, -1/2). - Peter Luschny, May 10 2022
a(n) = 2^n*n!*hypergeom([-n], [-n], -1/2). - Peter Luschny, Jul 28 2024

A001907 Expansion of e.g.f. exp(-x)/(1-4*x).

Original entry on oeis.org

1, 3, 25, 299, 4785, 95699, 2296777, 64309755, 2057912161, 74084837795, 2963393511801, 130389314519243, 6258687096923665, 325451729040030579, 18225296826241712425, 1093517809574502745499, 69985139812768175711937, 4758989507268235948411715
Offset: 0

Views

Author

Keywords

References

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

Column k=4 of A320032.

Programs

  • Magma
    I:=[3,25]; [1] cat [n le 2 select I[n]  else (4*n-1)*Self(n-1)+4*(n-1)*Self(n-2): n in [1..40]]; // Vincenzo Librandi, Aug 08 2015
  • Maple
    f:= gfun:-rectoproc({a(n) = (4*n-1)*a(n-1) + 4*(n-1)*a(n-2), a(0)=1, a(1)=3},a(n), remember):
    map(f, [$0..30]); # Robert Israel, Aug 07 2015
  • Mathematica
    With[{nn=20},CoefficientList[Series[Exp[-x]/(1-4x),{x,0,nn}], x] Range[0,nn]!] (* or *) Table[Sum[(-1)^(n+k) Binomial[n,k]k! 4^k, {k,0,n}], {n,0,20}](* Harvey P. Dale, Oct 25 2011 *)
    Join[{1}, RecurrenceTable[{a[1] == 3, a[2] == 25, a[n] == (4 n - 1) a[n-1] + 4(n - 1) a[n-2]}, a, {n, 20}]] (* Vincenzo Librandi, Aug 08 2015 *)
  • PARI
    a(n)=sum(k=0,n,(-1)^(n+k)*binomial(n,k)*k!*4^k)
    
  • PARI
    x = 'x+O('x^33); Vec(serlaplace(exp(-x)/(1-4*x))) \\ Gheorghe Coserea, Aug 06 2015
    

Formula

a(n) = Sum_{k=0..n} (-1)^(n+k)*C(n,k)*k!*4^k. - Ralf Stephan, May 22 2004
Recurrence: a(n) = (4*n-1)*a(n-1) + 4*(n-1)*a(n-2). - Vaclav Kotesovec, Aug 16 2013
a(n) ~ n! * exp(-1/4)*4^n. - Vaclav Kotesovec, Aug 16 2013
E.g.f. A(x) = exp(-x)/(1-4x) satisfies (1-4x)A' - (3+4x)A = 0. - Gheorghe Coserea, Aug 06 2015
a(n) = exp(-1/4)*4^n*Gamma(n+1,-1/4), where Gamma is the incomplete Gamma function. - Robert Israel, Aug 07 2015
a(0) = 1; a(n) = Sum_{k=1..n} binomial(n,k) * (4*k - 1) * a(n-k). - Ilya Gutkovskiy, Jan 17 2020

Extensions

More terms from Ralf Stephan, May 22 2004
Typo fixed by Charles R Greathouse IV, Oct 28 2009
Name clarified by Ilya Gutkovskiy, Jan 17 2020

A000180 Expansion of E.g.f. exp(-x)/(1-3x).

Original entry on oeis.org

1, 2, 13, 116, 1393, 20894, 376093, 7897952, 189550849, 5117872922, 153536187661, 5066694192812, 182400990941233, 7113638646708086, 298772823161739613, 13444777042278282584, 645349298029357564033, 32912814199497235765682
Offset: 0

Views

Author

Keywords

References

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

Column k=3 of A320032.

Programs

  • Mathematica
    FunctionExpand @ Table[ Gamma[n, -1/3]*3^(n-1)/Exp[ 1/3 ], {n, 24}]
    Range[0, 19]! CoefficientList[Series[Exp[-x]/(1 - 3 x), {x, 0, 19}], x] (* Vincenzo Librandi, Aug 15 2015 *)
    a[n_] := 3^n n! Sum[(-1)^i/(3^i i!), {i, 0, n}]; Table[a[n], {n, 0, 20}] (* Gerry Martens , May 06 2016 *)
  • PARI
    x='x+O('x^33); Vec(serlaplace(exp(-x) / (1-3*x))) \\ Gheorghe Coserea, Aug 06 2015

Formula

a(n) = Sum_{k=0..n} (-1)^(n+k)*binomial(n,k)*k!*3^k. - Benoit Cloitre, Nov 02 2003
a(n) = {(3^n*n!)/exp(1/3)}, where {x} = nearest integer. - Simon Plouffe, Feb 17 2011
Conjecture: (n+1)*a(n) -(n+1)*(3*n-1)*a(n-1) -3*(n-1)*(n+1)*a(n-2) = 0. - R. J. Mathar, Jul 24 2012
E.g.f.: exp(-x)/(1-3x) = A(x) satisfies (1-3x)A' - (2+3x)A = 0. - Gheorghe Coserea, Aug 06 2015
a(n+1) = (3*n+2)*a(n) + 3*n*a(n-1). - Gheorghe Coserea, Aug 06 2015
a(0) = 1; a(n) = Sum_{k=1..n} binomial(n,k) * (3*k - 1) * a(n-k). - Ilya Gutkovskiy, Jan 17 2020
a(n) = 3*n*a(n-1)+(-1)^n for n > 0. - Werner Schulte, Mar 09 2020

Extensions

More terms from Benoit Cloitre, Nov 02 2003

A001908 E.g.f. exp(-x)/(1-5*x).

Original entry on oeis.org

1, 4, 41, 614, 12281, 307024, 9210721, 322375234, 12895009361, 580275421244, 29013771062201, 1595757408421054, 95745444505263241, 6223453892842110664, 435641772498947746481, 32673132937421080986074, 2613850634993686478885921, 222177303974463350705303284
Offset: 0

Views

Author

Keywords

References

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

Column k=5 of A320032.

Programs

  • Maple
    f:= gfun:-rectoproc({a(n+1) = (5*n+4)* a(n) + 5*n*a(n-1),a(0)=1,a(1)=4},a(n),remember):
    seq(f(n),n=0..30); # Robert Israel, Aug 06 2015
  • Mathematica
    nn = 20; Range[0, nn]! CoefficientList[Series[Exp[-x]/(1 - 5 x), {x, 0, nn}], x] (* T. D. Noe, Aug 17 2012 *)
  • PARI
    x='x+O('x^33); Vec(serlaplace(exp(-x)/(1-5*x))) \\ Gheorghe Coserea, Aug 06 2015

Formula

E.g.f.: A(x) = exp(-x)/(1-5x) satisfies (1-5x)A' - (4+5x)A = 0. - Gheorghe Coserea, Aug 06 2015
a(n+1) = (5n+4) a(n) + 5n a(n-1). - Gheorghe Coserea, Aug 06 2015
a(n) = 5^n*exp(-1/5)*Gamma(n+1,-1/5), where Gamma is the incomplete Gamma function. - Robert Israel, Aug 06 2015
a(0) = 1; a(n) = Sum_{k=1..n} binomial(n,k) * (5*k - 1) * a(n-k). - Ilya Gutkovskiy, Jan 17 2020

A362759 Array read by antidiagonals: T(n,k) is the number of nonisomorphic multisets of derangements of an n-set with k derangements.

Original entry on oeis.org

1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 2, 2, 1, 1, 0, 1, 2, 7, 2, 1, 1, 0, 1, 3, 18, 16, 4, 1, 1, 0, 1, 3, 43, 138, 84, 4, 1, 1, 0, 1, 4, 93, 1559, 4642, 403, 7, 1, 1, 0, 1, 4, 200, 14337, 295058, 211600, 3028, 8, 1, 1, 0, 1, 5, 386, 117053, 15730237, 98019999, 13511246, 25431, 12, 1
Offset: 0

Views

Author

Andrew Howroyd, May 02 2023

Keywords

Comments

Isomorphism is up to permutation of the elements of the n-set. A derangement is a permutation without fixed points. Each derangement can be considered to be a set of disjoint directed cycles excluding singleton loops whose vertices cover the n-set. Permuting the elements of the n-set permutes each of the derangements in the multiset.

Examples

			Array begins:
===========================================================
n/k| 0 1   2      3        4           5              6 ...
---+-------------------------------------------------------
0  | 1 1   1      1        1           1              1 ...
1  | 1 0   0      0        0           0              0 ...
2  | 1 1   1      1        1           1              1 ...
3  | 1 1   2      2        3           3              4 ...
4  | 1 2   7     18       43          93            200 ...
5  | 1 2  16    138     1559       14337         117053 ...
6  | 1 4  84   4642   295058    15730237      706921410 ...
7  | 1 4 403 211600 98019999 36414994209 11282515303088 ...
  ...
		

Crossrefs

Columns k=0..3 are A000012, A002865, A362760, A362761.
Main diagonal is A362762.
Cf. A000166 (derangements), A320032, A362644, A362648.

Programs

  • PARI
    \\ here B(n,k) gives A320032(n,k).
    B(n,k) = sum(j=0, n, (-1)^(n-j)*binomial(n,j)*k^j*j!)
    K(v)=my(S=Set(v)); prod(i=1, #S, my(k=S[i], c=#select(t->t==k, v)); B(c, k))
    R(v, m)=concat(vector(#v, i, my(t=v[i], g=gcd(t, m)); vector(g, i, t/g)))
    permcount(v) = {my(m=1, s=0, k=0, t); for(i=1, #v, t=v[i]; k=if(i>1&&t==v[i-1], k+1, 1); m*=t*k; s+=t); s!/m}
    T(n,k) = {if(n==0, 1, my(s=0); forpart(q=n, s += permcount(q) * polcoef(exp(sum(m=1, k, K(R(q,m))*x^m/m, O(x*x^k))), k)); s/n!)}

Formula

T(0,k) = T(2,k) = 1.

A319392 a(n) = Sum_{k=0..n} (-1)^(n-k)*binomial(n,k)*k!*n^k.

Original entry on oeis.org

1, 0, 5, 116, 4785, 307024, 28435285, 3598112580, 596971515329, 125802906617600, 32834740225688901, 10399056510149276980, 3929349957207906673585, 1746371472945523953503376, 901944505258819679842017365, 535692457387043907059336566724, 362573376628272441934460817960705
Offset: 0

Views

Author

Ilya Gutkovskiy, Sep 18 2018

Keywords

Crossrefs

Main diagonal of A320032.

Programs

  • Maple
    b:= proc(n, k) option remember;
         `if`(n=0, 1, k*n*b(n-1, k)+(-1)^n)
        end:
    a:= n-> b(n$2):
    seq(a(n), n=0..17);  # Alois P. Heinz, May 07 2020
  • Mathematica
    Join[{1}, Table[Sum[(-1)^(n - k) Binomial[n, k] k! n^k, {k, 0, n}], {n, 16}]]
    Table[n! SeriesCoefficient[Exp[-x]/(1 - n x), {x, 0, n}], {n, 0, 16}]
    Table[(-1)^n HypergeometricPFQ[{1, -n}, {}, n], {n, 0, 16}]
  • PARI
    a(n) = sum(k=0, n, (-1)^(n-k)*binomial(n,k)*k!*n^k); \\ Michel Marcus, Sep 18 2018

Formula

a(n) = n! * [x^n] exp(-x)/(1 - n*x).
a(n) = exp(-1/n)*n^n*Gamma(n+1,-1/n) for n > 0, where Gamma(a,x) is the incomplete gamma function.
a(n) ~ n! * n^n. - Vaclav Kotesovec, Jun 09 2019

A320031 Square array A(n,k), n >= 0, k >= 0, read by antidiagonals, where column k is the expansion of the e.g.f. exp(x)/(1 - k*x).

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 1, 3, 5, 1, 1, 4, 13, 16, 1, 1, 5, 25, 79, 65, 1, 1, 6, 41, 226, 633, 326, 1, 1, 7, 61, 493, 2713, 6331, 1957, 1, 1, 8, 85, 916, 7889, 40696, 75973, 13700, 1, 1, 9, 113, 1531, 18321, 157781, 732529, 1063623, 109601, 1, 1, 10, 145, 2374, 36745, 458026, 3786745, 15383110, 17017969, 986410, 1
Offset: 0

Views

Author

Ilya Gutkovskiy, Oct 03 2018

Keywords

Examples

			E.g.f. of column k: A_k(x) = 1 + (k + 1)*x/1! + (2*k^2 + 2*k + 1)*x^2/2! + (6*k^3 + 6*k^2 + 3*k + 1)*x^3/3! + (24*k^4 + 24*k^3 + 12*k^2 + 4*k + 1)*x^4/4! + ...
Square array begins:
  1,    1,     1,      1,       1,       1,  ...
  1,    2,     3,      4,       5,       6,  ...
  1,    5,    13,     25,      41,      61,  ...
  1,   16,    79,    226,     493,     916,  ...
  1,   65,   633,   2713,    7889,   18321,  ...
  1,  326,  6331,  40696,  157781,  458026,  ...
		

Crossrefs

Columns k=0..6 give A000012, A000522, A010844, A010845, A056545, A056546, A056547.
Main diagonal gives A277452.

Programs

  • Maple
    A := (n, k) -> simplify(hypergeom([1, -n], [], -k)):
    for n from 0 to 5 do seq(A(n, k), k=0..8) od; # Peter Luschny, Oct 03 2018
    # second Maple program:
    A:= proc(n, k) option remember;
          1 + `if`(n>0, k*n*A(n-1, k), 0)
        end:
    seq(seq(A(n, d-n), n=0..d), d=0..12);  # Alois P. Heinz, May 09 2020
  • Mathematica
    Table[Function[k, n! SeriesCoefficient[Exp[x]/(1 - k x), {x, 0, n}]][j - n], {j, 0, 10}, {n, 0, j}] // Flatten
    Table[Function[k, HypergeometricPFQ[{1, -n}, {}, -k]][j - n], {j, 0, 10}, {n, 0, j}] // Flatten

Formula

E.g.f. of column k: exp(x)/(1 - k*x).
A(n,k) = Sum_{j=0..n} binomial(n,j)*j!*k^j.
A(n,k) = hypergeom_2F0([1, -n], [], -k).
A(n,k) = 1 + [n > 0] * k * n * A(n-1,k). - Alois P. Heinz, May 09 2020
A(n,k) = floor(n!*k^n*exp(1/k)), k > 0, n + k > 1. - Peter McNair, Dec 20 2021
From Werner Schulte, Apr 14 2024: (Start)
The LU decomposition of this array is given by the upper triangular matrix U which is the transpose of A007318 and the lower triangular matrix L = A371898, i.e., A(n, k) = Sum_{i=0..k} binomial(k, i) * A371898(n, i).
Conjecture: E.g.f. of row n is exp(x) * (Sum_{k=0..n} A371898(n, k) * x^k / k!). (End)
Showing 1-7 of 7 results.