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

A209899 Floor of the expected number of empty cells in a random placement of 2n balls into n cells.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, 11, 11
Offset: 1

Views

Author

Washington Bomfim, Mar 14 2012

Keywords

References

  • W. Feller, An Introduction to Probability Theory and its Applications, 2nd ed, Wiley, New York, 1965, p. 226.

Crossrefs

Cf. A209900.

Programs

  • Mathematica
    Table[Floor[n*(1 - 1/n)^(2 n)], {n, 100}] (* T. D. Noe, Mar 15 2012 *)

Formula

a(n) = floor(n*(1-1/n)^(2n)).

A210029 Number of sequences over the alphabet of n symbols of length 2n which have n distinct symbols. Also number of placements of 2n balls into n cells where no cell is empty.

Original entry on oeis.org

1, 14, 540, 40824, 5103000, 953029440, 248619571200, 86355926616960, 38528927611574400, 21473732319740064000, 14620825330739032204800, 11941607887300551753216000, 11523529003703200697461248000, 12970646659082235068963297280000
Offset: 1

Views

Author

Washington Bomfim, Mar 16 2012

Keywords

Examples

			a(2) = 14 because the 2^4 sequences on 2 symbols of length 4 can be represented by 0000, 0001, 0010, 0011, 0100, 0101, 0110, 0111, 1000, 1001, 1010, 1011, 1100,1110, and 1111. Only two of them do not have n distinct symbols.
a(10)= 21473732319740064000 since all digits appear in 21473732319740064000 nonnegative integers with 20 digits.
O.g.f.: A(x) = 1 + 14*x + 540*x^2 + 40824*x^3 + 5103000*x^4 + ... where
A(x) = x/(1+x)^2 + 2^4*x^2/(1+4*x)^3 + 3^6*x^3/(1+9*x)^4 + 4^8*x^4/(1+16*x)^5 + 5^10*x^5/(1+25*x)^6 +... - _Paul D. Hanna_, Feb 24 2013
E.g.f.: E(x) = 1 + 14*x + 540*x^2/2! + 40824*x^3/3! + 5103000*x^4/4! + ... where
E(x) = exp(-x)*x + 2^4*exp(-4*x)*x^2/2! + 3^6*exp(-9*x)*x^3/3! + 4^8*exp(-16*x)*x^4/4! + 5^10*exp(-25*x)*x^5/5! +... - _Paul D. Hanna_, Feb 24 2013
		

Crossrefs

Programs

  • Maple
    P := proc(n) option remember; if n = 0 then return 1 fi;
    expand(add(binomial(n,k)*P(n-k)*x, k=1..n)) end:
    a := n -> coeff(P(2*n), x, n); # Peter Luschny, Sep 11 2019
  • Mathematica
    Table[Sum[((-1)^v*Binomial[n, v]*(n - v)^(2 n)), {v, 0, n - 1}], {n, 20}] (* T. D. Noe, Mar 16 2012 *)
  • PARI
    {a(n)=n!*polcoeff(sum(m=1, n, (m^2)^m*exp(-m^2*x+x*O(x^n))*x^m/m!), n)} \\ Paul D. Hanna, Oct 26 2012
    
  • PARI
    {a(n)=polcoeff(sum(k=1, n, (k^2)^k*x^k/(1+k^2*x +x*O(x^n))^(k+1)), n)} for(n=0, 20, print1(a(n), ", ")) \\ Paul D. Hanna, Feb 24 2013

Formula

a(n) = Sum_{v=0..n-1}( (-1)^v * binomial(n,v) * (n-v)^(2n) ).
a(n) = n! * S2(2*n,n), where S2(n,k) = A008277(n,k) are the Stirling numbers of the second kind. - Paul D. Hanna, Oct 26 2012 [Also the central column of A131689 (suggesting a(0) = 1). - Peter Luschny, Sep 11 2019]
E.g.f.: Sum_{n>=1} (n^2)^n * exp(-n^2*x) * x^n/n! = Sum_{n>=1} a(n)*x^n/n!. - Paul D. Hanna, Oct 26 2012
a(n) ~ n^(2*n)*(2/(exp(c)*(2-c)))^n / sqrt(1-c), where c = -LambertW(-2/exp(2)) = 0.406375739959959907676958... - Vaclav Kotesovec, Jan 02 2013
O.g.f.: Sum_{n>=1} n^(2*n) * x^n / (1 + n^2*x)^(n+1). - Paul D. Hanna, Feb 24 2013
a(n) = [x^n] P(2*n) where P(n) = Sum_{k=1..n} binomial(n, k)*P(n-k)*x based in P(0) = 1. - Peter Luschny, Sep 11 2019

A210112 Floor of the expected value of number of trials until exactly one cell is empty in a random distribution of n balls in n cells.

Original entry on oeis.org

2, 1, 1, 2, 4, 7, 14, 29, 61, 129, 282, 623, 1400, 3189, 7347, 17101, 40167, 95110, 226841, 544555, 1314983, 3192458, 7788521, 19086807, 46968280, 116019696, 287602234, 715281652, 1784383956, 4464139806
Offset: 2

Views

Author

Washington Bomfim, Mar 18 2012

Keywords

Comments

Also floor of the expected value of number of trials until we have n-1 distinct symbols in a random sequence on n symbols of length n. A055775 corresponds to zero cells empty.

Examples

			For n=2, with symbols 0 and 1, the 2^2 sequences on 2 symbols of length 2 can be represented by 00, 01, 10, and 11. We have 2 sequences with a unique symbol, so a(2) = floor(4/2) = 2.
		

References

  • W. Feller, An Introduction to Probability Theory and its Applications, 2nd ed, Wiley, New York, 1965, (2.4) p. 92. (Occupancy problems)

Crossrefs

Formula

With m = 1, a(n) = floor(n^n/(binomial(n,m)_Sum{v=0..n-m-1}((-1)^v*binomial(n-m,v) (n-m-v)^n)))

A210113 Floor of the expected value of number of trials until exactly two cells are empty in a random distribution of n balls in n cells.

Original entry on oeis.org

9, 3, 2, 1, 2, 3, 4, 7, 12, 21, 40, 75, 147, 292, 594, 1229, 2582, 5499, 11859, 25868, 57008, 126814, 284523, 643401, 1465511, 3360493, 7753730, 17993787, 41982506, 98445184, 231932762, 548839352, 1304155087
Offset: 3

Views

Author

Washington Bomfim, Mar 18 2012

Keywords

Comments

Also floor of the expected value of number of trials until we have n-2 distinct symbols in a random sequence on n symbols of length n. A055775 corresponds to zero cells empty.

Examples

			For n=3, there are 3^3 = 27 sequences on 3 symbols of length 3. Only 3 sequences has a unique symbol, so a(3) = floor(27/3) = 9.
		

References

  • W. Feller, An Introduction to Probability Theory and its Applications, 2nd ed, Wiley, New York, 1965, (2.4) p. 92. (Occupancy problems)

Crossrefs

Formula

With m = 2, a(n) = floor(n^n/(binomial(n,m)*_Sum{v=0..n-m-1}((-1)^v*binomial(n-m,v)*(n-m-v)^n)))

A210114 Floor of the expected value of number of trials until exactly three cells are empty in a random distribution of n balls in n cells.

Original entry on oeis.org

64, 10, 4, 2, 2, 2, 2, 3, 5, 7, 11, 18, 31, 55, 100, 185, 348, 670, 1311, 2606, 5254, 10734, 22196, 46407, 98023, 209009, 449580, 974963, 2130442, 4688533, 10387113, 23156162, 51926745, 117090391, 265413053
Offset: 4

Views

Author

Washington Bomfim, Mar 18 2012

Keywords

Comments

Also floor of the expected value of number of trials until we have n-3 distinct symbols in a random sequence on n symbols of length n. A055775 corresponds to zero cells empty.

Examples

			For n=4, there are 4^4 = 256 sequences on 4 symbols of length 4. Only 4 sequences have a unique symbol, so a(4) = floor(256/4) = 64.
		

References

  • W. Feller, An Introduction to Probability Theory and its Applications, 2nd ed, Wiley, New York, 1965, (2.4) p. 92. (Occupancy problems)

Crossrefs

Formula

With m = 3, a(n) = floor(n^n/(binomial(n,m)*_Sum{v=0..n-m-1}((-1)^v*binomial(n-m,v)*(n-m-v)^n)))

A210115 Floor of the expected value of number of trials until exactly four cells are empty in a random distribution of n balls in n cells.

Original entry on oeis.org

625, 50, 13, 5, 3, 2, 2, 2, 3, 4, 5, 7, 11, 17, 28, 46, 78, 136, 242, 441, 815, 1533, 2927, 5669, 11123, 22090, 44363, 90027, 184482, 381499, 795686, 1672914, 3543925, 7561129, 16240832, 35106812, 76346759, 166982782, 367206632, 811693449
Offset: 5

Views

Author

Washington Bomfim, Mar 18 2012

Keywords

Comments

Also floor of the expected value of number of trials until we have n-4 distinct symbols in a random sequence on n symbols of length n. A055775 corresponds to zero cells empty.

Examples

			For n=5, there are 5^5 = 3125 sequences on 5 symbols of length 5. Only 5 sequences has a unique symbol, so a(5) = floor(3125/5) = 625.
		

References

  • W. Feller, An Introduction to Probability Theory and its Applications, 2nd ed, Wiley, New York, 1965, (2.4) p. 92. (Occupancy problems)

Crossrefs

Formula

With m = 4, a(n) = floor(n^n/(binomial(n,m)*_Sum{v=0..n-m-1}((-1)^v*binomial(n-m,v)*(n-m-v)^n)))

A210116 Floor of the expected value of number of trials until exactly five cells are empty in a random distribution of n balls in n cells.

Original entry on oeis.org

7776, 311, 51, 16, 7, 4, 3, 3, 2, 3, 3, 4, 5, 8, 11, 16, 25, 40, 66, 110, 187, 325, 574, 1032, 1885, 3492, 6557, 12467, 23988, 46667, 91731, 182078, 364734, 736972, 1501318, 3082136, 6374007, 13273719, 27825438, 58697777, 124566798
Offset: 6

Views

Author

Washington Bomfim, Mar 18 2012

Keywords

Comments

Also floor of the expected value of number of trials until we have n-5 distinct symbols in a random sequence on n symbols of length n. A055775 corresponds to zero cells empty.

Examples

			For n=6, there are 6^6 = 46656 sequences on 6 symbols of length 6. Only 6 sequences has a unique symbol, so a(6) = floor(46656/6) = 7776.
		

References

  • W. Feller, An Introduction to Probability Theory and its Applications, 2nd ed, Wiley, New York, 1965, (2.4) p. 92. (Occupancy problems)

Crossrefs

Formula

With m = 5, a(n) = floor(n^n/(binomial(n,m)*_Sum{v=0..n-m-1}((-1)^v*binomial(n-m,v)*(n-m-v)^n)))

A210024 Floor of the expected value of number of trials until all cells are occupied in a random distribution of 2n balls in n cells.

Original entry on oeis.org

1, 1, 1, 1, 1, 2, 2, 3, 3, 4, 5, 6, 7, 9, 11, 13, 16, 19, 23, 27, 33, 39, 47, 57, 68, 81, 97, 116, 139, 167, 199, 239, 286, 342, 409, 489, 585, 700, 838, 1002, 1199, 1434, 1716, 2053, 2456, 2938, 3515, 4205, 5030, 6018, 7199, 8612, 10302, 12325, 14744, 17638
Offset: 1

Views

Author

Washington Bomfim, Mar 16 2012

Keywords

Comments

Also floor of the expected value of number of trials until we have n distinct symbols in a random sequence on n symbols of length 2n.
From (2.3), see first reference,
p_0(2n,n)=Sum_{v=0..n-1}((-1)^v * binomial(n,v) * (n-v)^(2n)/n^(2n))
= 1/n^(2n).Sum_{v=0..n-1}( (-1)^v * binomial(n,v) * (n-v)^(2n)), so
the expected value 1/p_0(2n, n) =
1/(1/n^(2n).Sum_{v=0..n-1}( (-1)^v * binomial(n,v)*(n-v)^(2n)))
= n^(2n)/Sum_{v=0..n-1}( (-1)^v * binomial(n,v)*(n-v)^(2n) )

Examples

			For n=2, with symbols 0 and 1, the 2^4 sequences on 2 symbols of length 4 can be represented by 0000, 0001, 0010, 0011, 0100, 0101,0110, 0111, 1000, 1001, 1010, 1011, 1100, 1110, and 1111. We have 2 sequences with a unique symbol, and 14 sequences with 2 distinct symbols, so a(2) = floor(16/14) = floor(8/7) = 1.
		

References

  • W. Feller, An Introduction to Probability Theory and its Applications, 2nd ed, Wiley, New York, 1968, (2.3) p. 92. (Occupancy problems)

Crossrefs

Programs

  • Mathematica
    Table[Floor[n^(2 n)/Sum[((-1)^v*Binomial[n, v]*(n - v)^(2 n)), {v, 0, n - 1}]], {n, 100}] (* T. D. Noe, Mar 16 2012 *)

Formula

a(n) = floor(n^(2n)/Sum_{v=0..n-1}( (-1)^v * binomial(n,v) * (n-v)^(2n) ))
Showing 1-8 of 8 results.