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

A134954 Number of "hyperforests" on n labeled nodes, i.e., hypergraphs that have no cycles, assuming that each edge contains at least two vertices.

Original entry on oeis.org

1, 1, 2, 8, 55, 562, 7739, 134808, 2846764, 70720278, 2021462055, 65365925308, 2359387012261, 94042995460130, 4102781803365418, 194459091322828280, 9950303194613104995, 546698973373090998382, 32101070021048906407183, 2006125858248695722280564
Offset: 0

Views

Author

Don Knuth, Jan 26 2008

Keywords

Comments

The part of the name "assuming that each edge contains at least two vertices" is ambiguous. It may mean that not all n vertices have to be covered by some edge of the hypergraph, i.e., it is not necessarily a spanning hyperforest. However it is common to represent uncovered vertices as singleton edges, as in my example. - Gus Wiseman, May 20 2018

Examples

			From _Gus Wiseman_, May 20 2018: (Start)
The a(3) = 8 labeled spanning hyperforests are the following:
{{1,2,3}}
{{1,3},{2,3}}
{{1,2},{2,3}}
{{1,2},{1,3}}
{{3},{1,2}}
{{2},{1,3}}
{{1},{2,3}}
{{1},{2},{3}}
(End)
		

References

  • D. E. Knuth: The Art of Computer Programming, Volume 4, Generating All Combinations and Partitions Fascicle 3, Section 7.2.1.4. Generating all partitions. Page 38, Algorithm H. - Washington Bomfim, Sep 25 2008

Crossrefs

Programs

  • Maple
    b:= proc(n) option remember; add(Stirling2(n-1,i) *n^(i-1), i=0..n-1) end: B:= proc(n) x-> add(b(k) *x^k/k!, k=0..n) end: a:= n-> coeff(series(exp(B(n)(x)), x, n+1), x,n) *n!: seq(a(n), n=0..30);  # Alois P. Heinz, Sep 09 2008
  • Mathematica
    b[n_] := b[n] = Sum[StirlingS2[n-1, i]*n^(i-1), {i, 0, n-1}]; B[n_][x_] := Sum[b[k] *x^k/k!, {k, 0, n}]; a[0]=1; a[n_] := SeriesCoefficient[ Exp[B[n][x]], {x, 0, n}] *n!; Table[a[n], {n, 0, 30}] (* Jean-François Alcover, Feb 13 2015, after Alois P. Heinz *)

Formula

Exponential transform of A030019. - N. J. A. Sloane, Jan 30 2008
Binomial transform of A304911. - Gus Wiseman, May 20 2018
a(n) = Sum of n!*Product_{k=1..n} (A030019(k)/k!)^c_k / (c_k)! over all the partitions of n, c_1 + 2c_2 + ... + nc_n; c_1, c_2, ..., c_n >= 0. - Washington Bomfim, Sep 25 2008
a(n) ~ exp((n+1)/LambertW(1)) * n^(n-2) / (sqrt(1+LambertW(1)) * exp(2*n+2) * (LambertW(1))^n). - Vaclav Kotesovec, Jul 26 2014

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

Original entry on oeis.org

1, 0, 1, 0, 1, 1, 0, 2, 2, 1, 0, 5, 6, 3, 1, 0, 15, 22, 12, 4, 1, 0, 52, 94, 57, 20, 5, 1, 0, 203, 454, 309, 116, 30, 6, 1, 0, 877, 2430, 1866, 756, 205, 42, 7, 1, 0, 4140, 14214, 12351, 5428, 1555, 330, 56, 8, 1, 0, 21147, 89918, 88563, 42356, 12880, 2850, 497, 72, 9, 1
Offset: 0

Views

Author

Peter Luschny, Apr 18 2011

Keywords

Comments

A(n,k) is the n-th moment of a Poisson distribution with mean = k. - Geoffrey Critzer, Dec 23 2018

Examples

			Square array begins:
       A000007 A000110 A001861 A027710 A078944 A144180 A144223 A144263
A000012   1,    1,    1,    1,    1,     1,     1,     1, ...
A001477   0,    1,    2,    3,    4,     5,     6,     7, ...
A002378   0,    2,    6,   12,   20,    30,    42,    56, ...
A033445   0,    5,   22,   57,  116,   205,   330,   497, ...
          0,   15,   94,  309,  756,  1555,  2850,  4809, ...
          0,   52,  454, 1866, 5428, 12880, 26682, 50134, ...
		

Crossrefs

Programs

  • Maple
    # Cf. also the Maple prog. of Alois P. Heinz in A144223 and A144180.
    expnums := proc(k,n) option remember; local j;
    `if`(n = 0, 1, (1+add(binomial(n-1,j-1)*expnums(k,n-j), j = 1..n-1))*k) end:
    A189233_array := (k, n) -> expnums(k,n):
    seq(print(seq(A189233_array(k,n), k = 0..7)), n = 0..5);
    A189233_egf := k -> exp(k*(exp(x)-1));
    T := (n,k) -> n!*coeff(series(A189233_egf(k), x, n+1), x, n):
    seq(lprint(seq(T(n,k), k = 0..7)), n = 0..5):
    # alternative Maple program:
    A:= proc(n, k) option remember; `if`(n=0, 1,
          (1+add(binomial(n-1, j-1)*A(n-j, k), j=1..n-1))*k)
        end:
    seq(seq(A(d-k, k), k=0..d), d=0..12);  # Alois P. Heinz, Sep 25 2017
  • Mathematica
    max = 9; Clear[col]; col[k_] := col[k] = CoefficientList[ Series[ Exp[k*(Exp[x]-1)], {x, 0, max}], x]*Range[0, max]!; a[0, ] = 1; a[n?Positive, 0] = 0; a[n_, k_] := col[k][[n+1]]; Table[ a[n-k, k], {n, 0, max}, {k, 0, n}] // Flatten (* Jean-François Alcover, Jun 26 2013 *)
    Table[Table[BellB[n, k], {k, 0, 5}], {n, 0, 5}] // Grid  (* Geoffrey Critzer, Dec 23 2018 *)
  • Maxima
    A(n,k):=if k=0 and n=0 then 1 else if k=0 then 0 else  sum(stirling2(n,i)*k^i,i,0,n); /* Vladimir Kruchinin, Apr 12 2019 */

Formula

E.g.f. of column k: exp(k*(e^x-1)).
A(n,1) = A000110(n), A(n, -1) = A000587(n).
A(n,k) = BellPolynomial(n, k). - Geoffrey Critzer, Dec 23 2018
A(n,k) = Sum_{i=0..n} Stirling2(n,i)*k^i. - Vladimir Kruchinin, Apr 12 2019

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

Original entry on oeis.org

1, 1, 0, 1, 1, 0, 1, 2, 2, 0, 1, 3, 6, 5, 0, 1, 4, 12, 22, 15, 0, 1, 5, 20, 57, 94, 52, 0, 1, 6, 30, 116, 309, 454, 203, 0, 1, 7, 42, 205, 756, 1866, 2430, 877, 0, 1, 8, 56, 330, 1555, 5428, 12351, 14214, 4140, 0, 1, 9, 72, 497, 2850, 12880, 42356, 88563, 89918, 21147, 0
Offset: 0

Views

Author

Seiichi Manyama, Sep 25 2017

Keywords

Examples

			Square array begins:
   1,   1,    1,     1,     1,      1,      1, ...
   0,   1,    2,     3,     4,      5,      6, ...
   0,   2,    6,    12,    20,     30,     42, ...
   0,   5,   22,    57,   116,    205,    330, ...
   0,  15,   94,   309,   756,   1555,   2850, ...
   0,  52,  454,  1866,  5428,  12880,  26682, ...
   0, 203, 2430, 12351, 42356, 115155, 268098, ...
		

Crossrefs

Rows n=0..2 give A000012, A001477, A002378.
Main diagonal gives A242817.
Same array, different indexing is A189233.
Cf. A292861.

Programs

  • Maple
    A:= proc(n, k) option remember; `if`(n=0, 1,
          (1+add(binomial(n-1, j-1)*A(n-j, k), j=1..n-1))*k)
        end:
    seq(seq(A(n, d-n), n=0..d), d=0..12);  # Alois P. Heinz, Sep 25 2017
  • Mathematica
    A[0, ] = 1; A[n /; n >= 0, k_ /; k >= 0] := A[n, k] = k*Sum[Binomial[n-1, j]*A[j, k], {j, 0, n-1}]; A[, ] = 0;
    Table[A[n, d - n], {d, 0, 12}, {n, 0, d}] // Flatten (* Jean-François Alcover, Feb 13 2021 *)
    A292860[n_, k_] := BellB[n, k]; Table[A292860[k, n - k], {n, 0, 10}, {k, 0, n}] // Flatten (* Peter Luschny, Dec 23 2021 *)

Formula

A(0,k) = 1 and A(n,k) = k * Sum_{j=0..n-1} binomial(n-1,j) * A(j,k) for n > 0.
A(n,k) = Sum_{j=0..n} k^j * Stirling2(n,j). - Seiichi Manyama, Jul 27 2019
A(n,k) = BellPolynomial(n, k). - Peter Luschny, Dec 23 2021

A292866 a(n) = n! * [x^n] exp(n*(1 - exp(x))).

Original entry on oeis.org

1, -1, 2, -3, -20, 370, -4074, 34293, -138312, -2932533, 106271090, -2192834490, 32208497124, -206343936097, -7657279887698, 412496622532785, -12455477719752976, 260294034150380430, -2256541295745391542, -122593550603339550843, 8728842979656718306780
Offset: 0

Views

Author

Seiichi Manyama, Sep 25 2017

Keywords

Crossrefs

Main diagonal of A292861.
Cf. A242817.

Programs

  • Maple
    b:= proc(n, k) option remember; `if`(n=0, 1,
          -(1+add(binomial(n-1, j-1)*b(n-j, k), j=1..n-1))*k)
        end:
    a:= n-> b(n$2):
    seq(a(n), n=0..30);  # Alois P. Heinz, Sep 25 2017
  • Mathematica
    Table[n!*SeriesCoefficient[E^(n*(1 - E^x)),{x,0,n}], {n,0,20}] (* Vaclav Kotesovec, Sep 25 2017 *)
    a[n_] := BellB[n, -n]; Table[a[n], {n, 0, 20}] (* Peter Luschny, Dec 23 2021 *)
  • PARI
    {a(n) = sum(k=0, n, (-n)^k*stirling(n, k, 2))} \\ Seiichi Manyama, Jul 28 2019
  • Ruby
    def ncr(n, r)
      return 1 if r == 0
      (n - r + 1..n).inject(:*) / (1..r).inject(:*)
    end
    def A(k, n)
      ary = [1]
      (1..n).each{|i| ary << k * (0..i - 1).inject(0){|s, j| s + ncr(i - 1, j) * ary[j]}}
      ary
    end
    def A292866(n)
      (0..n).map{|i| A(-i, i)[-1]}
    end
    p A292866(20)
    

Formula

a(n) = exp(n) * Sum_{k>=0} (-n)^k*k^n/k!. - Ilya Gutkovskiy, Jul 13 2019
a(n) = Sum_{k=0..n} (-n)^k * Stirling2(n,k). - Seiichi Manyama, Jul 28 2019
a(n) = BellPolynomial(n, -n). - Peter Luschny, Dec 23 2021

A301419 a(n) = [x^n] Sum_{k>=0} x^k/Product_{j=1..k} (1 - n*j*x).

Original entry on oeis.org

1, 1, 3, 19, 201, 3176, 69823, 2026249, 74565473, 3376695763, 183991725451, 11854772145800, 890415496931689, 77023751991841669, 7592990698770559111, 845240026276785888451, 105409073489605774592897, 14625467507717709778793020, 2244123413703647502288608467, 378751257186051653931253015229
Offset: 0

Views

Author

Ilya Gutkovskiy, Mar 20 2018

Keywords

Crossrefs

Programs

  • GAP
    List([0..20],n->Sum([0..n],k->n^(n-k)*Stirling2(n,k))); # Muniru A Asiru, Mar 20 2018
    
  • Mathematica
    Table[SeriesCoefficient[Sum[x^k/Product[(1 - n j x), {j, 1, k}], {k, 0, n}], {x, 0, n}], {n, 0, 19}]
    Join[{1}, Table[n! SeriesCoefficient[Exp[(Exp[n x] - 1)/n], {x, 0, n}], {n, 19}]]
    Join[{1}, Table[Sum[n^(n - k) StirlingS2[n, k], {k, 0, n}], {n, 19}]]
    (* Or: *)
    A301419[n_] := If[n == 0, 1, n^n BellB[n, 1/n]];
    Table[A301419[n], {n, 0, 19}] (* Peter Luschny, Dec 22 2021 *)
  • PARI
    a(n) = sum(k=0, n, n^(n-k)*stirling(n, k, 2)); \\ Michel Marcus, Mar 23 2018

Formula

a(n) = n! * [x^n] exp((exp(n*x) - 1)/n), for n > 0.
a(n) = Sum_{k=0..n} n^(n-k)*Stirling2(n,k).
a(n) = n^n * BellPolynomial(n, 1/n) for n >= 1. - Peter Luschny, Dec 22 2021
a(n) ~ exp(n/LambertW(n^2) - n) * n^(2*n) / (sqrt(1 + LambertW(n^2)) * LambertW(n^2)^n). - Vaclav Kotesovec, Jun 06 2022

A317172 a(n) = n! * [x^n] 1/(1 - n*log(1 + x)).

Original entry on oeis.org

1, 1, 6, 114, 4168, 248870, 21966768, 2685571560, 434202400896, 89679267601632, 23032451508686400, 7199033431349412576, 2690461258552995849216, 1184680716090974803461072, 606986901206377433194091520, 358023049940533240478842992000, 240858598980174362552808566194176
Offset: 0

Views

Author

Ilya Gutkovskiy, Jul 23 2018

Keywords

Crossrefs

Main diagonal of A320080.

Programs

  • Mathematica
    Table[n! SeriesCoefficient[1/(1 - n Log[1 + x]), {x, 0, n}], {n, 0, 16}]
    Join[{1}, Table[Sum[StirlingS1[n, k] n^k k!, {k, n}], {n, 16}]]
  • PARI
    {a(n) = sum(k=0, n, k!*n^k*stirling(n, k, 1))} \\ Seiichi Manyama, Jun 12 2020

Formula

a(n) = Sum_{k=0..n} Stirling1(n,k)*n^k*k!.
a(n) ~ sqrt(2*Pi) * n^(2*n + 1/2) / exp(n + 1/2). - Vaclav Kotesovec, Jul 23 2018

A334240 a(n) = exp(-n) * Sum_{k>=0} (k + 1)^n * n^k / k!.

Original entry on oeis.org

1, 2, 11, 103, 1357, 23031, 478207, 11741094, 332734521, 10689163687, 383851610331, 15236978883127, 662491755803269, 31311446539427926, 1598351161031967063, 87638233726766111731, 5136809177699534717169, 320521818480481139673919, 21212211430440994022892019
Offset: 0

Views

Author

Ilya Gutkovskiy, Apr 19 2020

Keywords

Crossrefs

Programs

  • Mathematica
    Table[n! SeriesCoefficient[Exp[x + n (Exp[x] - 1)], {x, 0, n}], {n, 0, 18}]
    Table[Sum[Binomial[n, k] BellB[k, n], {k, 0, n}], {n, 0, 18}]

Formula

a(n) = [x^n] (1/(1 - x)) * Sum_{k>=0} (n*x/(1 - x))^k / Product_{j=1..k} (1 - j*x/(1 - x)).
a(n) = n! * [x^n] exp(x + n*(exp(x) - 1)).
a(n) = Sum_{k=0..n} binomial(n,k) * BellPolynomial_k(n).
a(n) ~ exp((1/LambertW(1) - 2)*n) * n^n / (sqrt(1+LambertW(1)) * LambertW(1)^(n+1)). - Vaclav Kotesovec, Jun 08 2020

A350256 Triangle read by rows. T(n, k) = BellPolynomial(n, k).

Original entry on oeis.org

1, 0, 1, 0, 2, 6, 0, 5, 22, 57, 0, 15, 94, 309, 756, 0, 52, 454, 1866, 5428, 12880, 0, 203, 2430, 12351, 42356, 115155, 268098, 0, 877, 14214, 88563, 355636, 1101705, 2869242, 6593839, 0, 4140, 89918, 681870, 3188340, 11202680, 32510850, 82187658, 187104200
Offset: 0

Views

Author

Peter Luschny, Dec 22 2021

Keywords

Examples

			Triangle begins:
[0] 1
[1] 0,    1
[2] 0,    2,     6
[3] 0,    5,    22,     57
[4] 0,   15,    94,    309,     756
[5] 0,   52,   454,   1866,    5428,    12880
[6] 0,  203,  2430,  12351,   42356,   115155,   268098
[7] 0,  877, 14214,  88563,  355636,  1101705,  2869242,  6593839
[8] 0, 4140, 89918, 681870, 3188340, 11202680, 32510850, 82187658, 187104200
		

Crossrefs

Cf. A242817 (main diagonal), A000110 (column 1), A350264 (row sums), A350263 (Bell(n,-k)), A189233 and A292860 (array).

Programs

  • Maple
    A350256 := (n, k) -> ifelse(n = 0, 1, BellB(n, k)):
    seq(seq(A350256(n, k), k = 0..n), n = 0..8);
  • Mathematica
    T[n_, k_] := BellB[n, k]; Table[T[n, k], {n, 0, 8}, {k, 0, n}] // Flatten

A334242 a(n) = exp(-n) * Sum_{k>=0} (k + n)^n * n^k / k!.

Original entry on oeis.org

1, 2, 18, 273, 5812, 159255, 5336322, 211385076, 9663571400, 500742188415, 29002424377110, 1856728690107027, 130194428384173116, 9923500366931329282, 816909605562423271178, 72231668379957026776065, 6827368666949651984215824, 686970682778467688690704639
Offset: 0

Views

Author

Ilya Gutkovskiy, Apr 19 2020

Keywords

Crossrefs

Programs

  • Mathematica
    Table[n! SeriesCoefficient[Exp[n (Exp[x] + x - 1)], {x, 0, n}], {n, 0, 17}]
    Join[{1}, Table[Sum[Binomial[n, k] BellB[k, n] n^(n - k), {k, 0, n}], {n, 1, 17}]]

Formula

a(n) = n! * [x^n] exp(n*(exp(x) + x - 1)).
a(n) = Sum_{k=0..n} binomial(n,k) * BellPolynomial_k(n) * n^(n-k).
a(n) ~ c * exp((r^2/(1-r) - 1)*n) * n^n / (1-r)^n, where r = A333761 = 0.59894186245845296434937... is the root of the equation LambertW(r) = 1-r and c = 0.897950293373062982395233981707095204244165706668136925178217032608352851... - Vaclav Kotesovec, Jun 09 2020

A299824 a(n) = (1/e^n)*Sum_{j >= 1} j^n * n^j / (j-1)!.

Original entry on oeis.org

2, 22, 309, 5428, 115155, 2869242, 82187658, 2661876168, 96202473183, 3838516103310, 167606767714397, 7949901069639228, 407048805012563038, 22376916254447538882, 1314573505901491675965, 82188946843192555474704, 5448870914168179374456623, 381819805747937892412056342
Offset: 1

Views

Author

Pedro Caceres, Feb 19 2018

Keywords

Comments

For m>1, A242817(m) and a(m-1) are also the m-th and (m+1)-st terms of the sequences "Number of ways of placing X labeled balls into X unlabeled (but (m-1)-colored) boxes". For instance, sequence A144180 for 5-colored boxes (m = 6), has A144180(6) = 12880, and A144180(7) = 115155, which are A242817(6) and a(5) respectively. Same pattern can be observed for A027710, A144223, A144263 (comment added after Omar E. Pol's formula).

Examples

			a(4) = (1/e^4)*Sum_{j >= 1} j^4 * 4^j / (j-1)! = 5428.
		

Crossrefs

Programs

  • PARI
    a(n) = round(exp(-n)*suminf(j = 1, (j^n)*(n^j)/(j-1)!)); \\ Michel Marcus, Feb 24 2018
    
  • PARI
    A299824(n,f=exp(n),S=n/f,t)=for(j=2,oo,S+=(t=j^n*n^j)/(f*=j-1);tn&&return(ceil(S))) \\ For n > 23, use \p## with some ## >= 2n. - M. F. Hasler, Mar 09 2018

Formula

a(n) = A189233(n+1,n). - Omar E. Pol, Feb 24 2018
a(n) ~ exp(n/LambertW(1) - 2*n) * n^(n + 1) / (sqrt(1 + LambertW(1)) * LambertW(1)^(n + 1)). - Vaclav Kotesovec, Mar 08 2018
Or: a(n) ~ (1/sqrt(1+w)) * exp(1/w-2)^n * (n/w)^(n+1), with w = LambertW(1) ~ 0.56714329... The relative error decreases from 10^-2 for a(2) to 10^-3 for a(15), but reaches 10^-3.5 only at a(45). - M. F. Hasler, Mar 09 2018
Showing 1-10 of 22 results. Next