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

A061711 a(n) = n^n * n!.

Original entry on oeis.org

1, 1, 8, 162, 6144, 375000, 33592320, 4150656720, 676457349120, 140587147048320, 36288000000000000, 11388728893445164800, 4270826380475341209600, 1886009588552176549862400, 968725766854884321342259200, 572622616354851562500000000000
Offset: 0

Views

Author

Lorenzo Fortunato (fortunat(AT)pd.infn.it), Jun 19 2001

Keywords

Comments

a(n) is the product of first n terms of an arithmetic progression with first term n and common difference n. E.g. a(3) = 3*6*9 = 162. - Amarnath Murthy, Sep 20 2003
Product of the entries in the last column of an n X n square array whose elements are the numbers 1..n^2 listed in increasing order by rows. - Wesley Ivan Hurt, Mar 31 2025

Examples

			a(1) = 1^1 * 1! = 1;
a(2) = 2^2 * 2! = 8;
a(3) = 3^3 * 3! = 162.
		

Crossrefs

Main diagonal of A131182.
Cf. A336765.

Programs

  • Magma
    [Factorial(n)*n^n: n in [0..30]]; // G. C. Greubel, Nov 29 2022
  • Mathematica
    Table[If[n == 0, 1, n^n] * n!, {n, 0, 20}] (* Vaclav Kotesovec, Mar 08 2018 *)
  • PARI
    a(n) = n!*n^n; \\ Harry J. Smith, Jul 26 2009
    
  • Python
    from math import factorial
    def A061711(n): return factorial(n)*n**n # Chai Wah Wu, Sep 03 2022
    

Formula

E.g.f.: sinh(n*x)^n. - Vaclav Kotesovec, Nov 05 2014
a(n) = [x^n] 1/(1 - n*x/(1 - n*x/(1 - 2*n*x/(1 - 2*n*x/(1 - 3*n*x/(1 - 3*n*x/(1 - ...))))))), a continued fraction. - Ilya Gutkovskiy, Sep 20 2017
Sum_{n>=1} 1/a(n) = A336765. - Amiram Eldar, Nov 20 2020
a(n) ~ exp(-n)*n^(2*n)*sqrt(2*n*Pi). - Peter Luschny, Jan 10 2022

A090582 T(n, k) = Sum_{j=0..n-k} (-1)^j*binomial(n - k + 1, j)*(n - k + 1 - j)^n. Triangle read by rows, T(n, k) for 1 <= k <= n.

Original entry on oeis.org

1, 2, 1, 6, 6, 1, 24, 36, 14, 1, 120, 240, 150, 30, 1, 720, 1800, 1560, 540, 62, 1, 5040, 15120, 16800, 8400, 1806, 126, 1, 40320, 141120, 191520, 126000, 40824, 5796, 254, 1, 362880, 1451520, 2328480, 1905120, 834120, 186480, 18150, 510, 1, 3628800, 16329600, 30240000, 29635200, 16435440, 5103000, 818520, 55980, 1022, 1
Offset: 1

Views

Author

Hugo Pfoertner, Jan 11 2004

Keywords

Comments

Let Q(m, n) = Sum_(k=0..n-1) (-1)^k * binomial(n, k) * (n-k)^m. Then Q(m,n) is the numerator of the probability P(m,n) = Q(m,n)/n^m of seeing each card at least once if m >= n cards are drawn with replacement from a deck of n cards, written in a two-dimensional array read by antidiagonals with Q(m,m) as first row and Q(m,1) as first column.
The sequence is given as a matrix with the first row containing the cases #draws = size_of_deck. The second row contains #draws = 1 + size_of_deck. If "mn" indicates m cards drawn from a deck with n cards then the locations in the matrix are:
11 22 33 44 55 66 77 ...
21 32 43 54 65 76 87 ...
31 42 53 64 75 86 97 ...
41 52 63 74 85 .. .. ...
read by antidiagonals ->:
11, 22, 21, 33, 32, 31, 44, 43, 42, 41, 55, 54, 53, 52, ....
The probabilities are given by Q(m,n)/n^m:
.(m,n):.....11..22..21..33..32..31..44..43..42..41...55...54..53..52..51
.....Q:......1...2...1...6...6...1..24..36..14...1..120..240.150..30...1
...n^m:......1...4...1..27...8...1.256..81..16...1.3125.1024.243..32...1
%.Success:.100..50.100..22..75.100...9..44..88.100....4...23..62..94.100
P(n,n) = n!/n^n which can be approximated by sqrt(Pi*(2n+1/3))/e^n (Gosper's approximation to n!).
Let P[n] be the set of all n-permutations. Build a superset Q[n] of P[n] composed of n-permutations in which some (possibly all or none) ascents have been designated. An ascent in a permutation s[1]s[2]...s[n] is a pair of consecutive elements s[i],s[i+1] such that s[i] < s[i+1]. As a triangular array read by rows T(n,k) is the number of elements in Q[n] that have exactly k distinguished ascents, n >= 1, 0 <= k <= n-1. Row sums are A000670. E.g.f. is y/(1+y-exp(y*x)). For example, T(3,1)=6 because there are four 3-permutations with one ascent, with these we would also count 1->2 3, and 1 2->3 where exactly one ascent is designated by "->". (After Flajolet and Sedgewick.) - Geoffrey Critzer, Nov 13 2012
Sum_(k=1..n) Q(n, k)*binomial(x, k) = x^n such that Sum_{k=1..n} Q(n, i)*binomial(x+1,i+1) = Sum_{k=1..x} k^n. - David A. Corneth, Feb 17 2014
A141618(n,n-k+1) = a(n,k) * C(n,k-1) / k. - Tom Copeland, Oct 25 2014
See A074909 and above g.f.s below for associations among this array and the Bernoulli polynomials and their umbral compositional inverses. - Tom Copeland, Nov 14 2014
For connections to toric varieties and Eulerian polynomials (in addition to those noted below), see the Dolgachev and Lunts and the Stembridge links in A019538. - Tom Copeland, Dec 31 2015
See A008279 for a relation between the e.g.f.s enumerating the faces of permutahedra (this entry) and stellahedra. - Tom Copeland, Nov 14 2016
From the Hasan and Franco and Hasan papers: The m-permutohedra for m=1,2,3,4 are the line segment, hexagon, truncated octahedron and omnitruncated 5-cell. The first three are well-known from the study of elliptic models, brane tilings and brane brick models. The m+1 torus can be tiled by a single (m+2)-permutohedron. Relations to toric Calabi-Yau Kahler manifolds are also discussed. - Tom Copeland, May 14 2020

Examples

			For m = 4, n = 2, we draw 4 times from a deck of two cards. Call the cards "a" and "b" - of the 16 possible combinations of draws (each of which is equally likely to occur), only two do not contain both a and b: a, a, a, a and b, b, b, b. So the probability of seeing both a and b is 14/16. Therefore Q(m, n) = 14.
Table starts:
  [1] 1;
  [2] 2,      1;
  [3] 6,      6,       1;
  [4] 24,     36,      14,      1;
  [5] 120,    240,     150,     30,      1;
  [6] 720,    1800,    1560,    540,     62,     1;
  [7] 5040,   15120,   16800,   8400,    1806,   126,    1;
  [8] 40320,  141120,  191520,  126000,  40824,  5796,   254,   1;
  [9] 362880, 1451520, 2328480, 1905120, 834120, 186480, 18150, 510, 1.
		

Crossrefs

Cf. A073593 first m >= n giving at least 50% probability, A085813 ditto for 95%, A055775 n^n/n!, A090583 Gosper's approximation to n!.
Reflected version of A019538.
Cf. A233734 (central terms).

Programs

  • Haskell
    a090582 n k = a090582_tabl !! (n-1) !! (k-1)
    a090582_row n = a090582_tabl !! (n-1)
    a090582_tabl = map reverse a019538_tabl
    -- Reinhard Zumkeller, Dec 15 2013
    
  • Maple
    T := (n, k) -> add((-1)^j*binomial(n - k + 1, j)*(n - k + 1 - j)^n, j = 0..n-k):
    # Or:
    T := (n, k) -> (n - k + 1)!*Stirling2(n, n - k + 1):
    for n from 1 to 9 do seq( T(n, k), k = 1..n) od; # Peter Luschny, May 21 2021
  • Mathematica
    In[1]:= Table[Table[k! StirlingS2[n, k], {k, n, 1, -1}], {n, 1, 6}] (* Victor Adamchik, Oct 05 2005 *)
    nn=6; a=y/(1+y-Exp[y x]); Range[0,nn]! CoefficientList[Series[a, {x,0,nn}], {x,y}]//Grid (* Geoffrey Critzer, Nov 10 2012 *)
  • PARI
    a(n)={m=ceil((-1+sqrt(1+8*n))/2);k=m+1+binomial(m,2)-n;k*sum(i=1,k,(-1)^(i+k)*i^(m-1)*binomial(k-1,i-1))} \\ David A. Corneth, Feb 17 2014

Formula

T(n, k) = (n - k + 1)!*Stirling2(n, n - k + 1), generated by Stirling numbers of the second kind multiplied by a factorial. - Victor Adamchik, Oct 05 2005
Triangle T(n,k), 1 <= k <= n, read by rows given by [1, 1, 2, 2, 3, 3, 4, 4, 5, 5, ...] DELTA [0, 1, 0, 2, 0, 3, 0, 4, 0, 5, 0, 6, 0, ...] where DELTA is the operator defined in A084938. - Philippe Deléham, Nov 10 2006
From Tom Copeland, Oct 07 2008: (Start)
G(x,t) = 1/ (1 + (1-exp(x*t))/t) = 1 + 1*x + (2 + t)*x^2/2! + (6 + 6*t + t^2)*x^3/3! + ... gives row polynomials of A090582, the f-polynomials for the permutohedra (see A019538).
G(x,t-1) = 1 + 1*x + (1 + t)*x^2/2! + (1 + 4*t + t^2)*x^3/3! + ... gives row polynomials for A008292, the h-polynomials of permutohedra.
G[(t+1)x,-1/(t+1)] = 1 + (1 + t)*x + (1 + 3*t + 2*t^2)*x^2/2! + ... gives row polynomials of A028246. (End)
From Tom Copeland, Oct 11 2011: (Start)
With e.g.f. A(x,t) = G(x,t) - 1, the compositional inverse in x is
B(x,t) = log((t+1)-t/(1+x))/t. Let h(x,t) = 1/(dB/dx) = (1+x)*(1+(1+t)x), then the row polynomial P(n,t) is given by (1/n!)*(h(x,t)*d/dx)^n x, evaluated at x=0, A=exp(x*h(y,t)*d/dy) y, eval. at y=0, and dA/dx = h(A(x,t),t). (End)
k <= 0 or k > n yields Q(n, k) = 0; Q(1,1) = 1; Q(n, k) = k * (Q(n-1, k) + Q(n-1, k-1)). - David A. Corneth, Feb 17 2014
T = A008292*A007318. - Tom Copeland, Nov 13 2016
With all offsets 0 for this entry, let A_n(x;y) = (y + E.(x))^n, an Appell sequence in y where E.(x)^k = E_k(x) are the Eulerian polynomials of A123125 with offsets -1 so that the array becomes A008292; i.e., we ignore the first row and first column of A123125. Then the row polynomials of this entry, A090582, are given by A_n(1 + x;0). Other specializations of A_n(x;y) give A028246, A046802, A119879, A130850, and A248727. - Tom Copeland, Jan 24 2020

A094082 Decimal expansion of Sum_{n>=1} (n!/n^n).

Original entry on oeis.org

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

Views

Author

Ross La Haye, May 01 2004

Keywords

Comments

Sum_{n>=1} n!/n^(n+2) = Integral_{x=0..infinity} -log(1-x*exp(-x)) dx = 1.157694752682... . - Vaclav Kotesovec, Jan 05 2016

Examples

			1.879853862175258533486306145...
		

Crossrefs

Programs

  • Mathematica
    RealDigits[ NSum[n!/n^n, {n, 1, Infinity}, WorkingPrecision -> 110, NSumTerms -> 180] , 10, 99] // First (* Jean-François Alcover, Feb 12 2013 *)
    RealDigits @ NIntegrate[x E^x/(E^x - x)^2, {x, 0, Infinity}, WorkingPrecision -> 105] // First (* Michael Somos, May 18 2021 *)
  • PARI
    firstDecimalDigits(n)={default(realprecision,n);return(digits(floor(suminf(n=1,n!/(n^n))*10^n)))}
    print(firstDecimalDigits(98)); \\ R. J. Cano, Dec 30 2016
    
  • PARI
    suminf(n=1,n!/(n^n)) \\ Michel Marcus, Dec 30 2016

Formula

Equals Integral_{x=0..oo} x*exp(x)/(exp(x)-x)^2 dx. - Michael Somos, May 18 2021
Equals Integral_{x=1..oo} 1/(x - log(x))^2 dx. - Fabián Pereyra, May 10 2023

Extensions

More terms from Francisco Salinas (franciscodesalinas(AT)hotmail.com), May 01 2004

A073225 a(n) = ceiling(n^n/n!).

Original entry on oeis.org

1, 1, 2, 5, 11, 27, 65, 164, 417, 1068, 2756, 7148, 18614, 48639, 127464, 334865, 881658, 2325751, 6145597, 16263867, 43099805, 114356612, 303761261, 807692035, 2149632062, 5726042116, 15264691108, 40722913455, 108713644517
Offset: 0

Views

Author

Michael Somos, Jul 22 2002

Keywords

Comments

The van der Waerden conjecture, now a theorem thanks to Egorycev, states that the permanent of any n X n doubly stochastic matrix is >= n!/n^n, with equality iff the matrix has all entries equal to 1/n.
Therefore the reciprocal of the permanent of any n X n doubly stochastic matrix is bounded from above by n^n/n! and this sequence.
n^n/n! = A001142(n)/A001142(n-1), where A001142(n) is product{k=0 to n} C(n,k) (where C() is a binomial coefficient). - Leroy Quet, May 01 2004

Examples

			G.f.: 1 + x + 2*x^2 + 5*x^3 + 11*x^4 + 27*x^5 + 65*x^6 + 164*x^7 + 417*x^8 + ...
		

References

  • G. P. Egorycev, Solution of the van der Waerden problem for permanents (Russian), Preprint IFSO-13 M. Akad. Nauk SSSR Sibirsk. Otdel., Inst. Fiz., Krasnoyarsk, 1980. 12 pp. Math. Rev. 82e:15006.
  • J. H. van Lint, R. M. Wilson, A Course in Combinatorics, Cambridge Univ. Press, 1992. p. 86.

Crossrefs

Programs

  • Magma
    [Ceiling(n^n/Factorial(n)): n in [0..50]]; // G. C. Greubel, May 29 2018
  • Mathematica
    Join[{1}, Table[Ceiling[n^n/n!], {n,1,50}]] (* G. C. Greubel, May 29 2018 *)
  • PARI
    {a(n) = ceil(n^n / n!)}
    

A090583 Gosper's approximation to n!, sqrt((2*n+1/3)*Pi)*n^n/e^n, rounded to nearest integer.

Original entry on oeis.org

1, 1, 2, 6, 24, 120, 720, 5039, 40316, 362851, 3628561, 39914615, 478979481, 6226774954, 87175314872, 1307635379670, 20922240412500, 355679137660826, 6402240370021199, 121642823201649058, 2432860847996122437, 51090157192742729183, 1123984974735953018069
Offset: 0

Views

Author

Hugo Pfoertner, Jan 10 2004

Keywords

Crossrefs

Programs

  • Magma
    C := ComplexField(); [Round(Sqrt((2*n + 1/3)*Pi(C))*n^n/Exp(n)): n in [0..30]]; // G. C. Greubel, Nov 28 2017
  • Maple
    Digits:= 2000;
    a:= n-> round(sqrt((2*n+1/3)*Pi)*n^n/exp(n)):
    seq(a(n), n=0..30);  # Alois P. Heinz, Feb 04 2013
  • Mathematica
    Join[{1}, Table[Round[Sqrt[(2*n + 1/3)*Pi]*n^n/Exp[n]], {n, 1, 50}]] (* G. C. Greubel, Nov 28 2017 *)
  • PARI
    a(n) = round(sqrt((2*n+1/3)*Pi)*n^n/exp(n)); \\ Bill McEachen, Aug 16 2014
    

A208846 a(n) = A056915(n) mod 76057 mod 13.

Original entry on oeis.org

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

Author

Washington Bomfim, Mar 02 2012

Keywords

Comments

A056915(n) mod 76057 mod 13 is a bijection from the set of the first 13 terms of A056915 to {0,1,2,3,4,5,6,7,8,9,10,11,12}.
One of the tests for primality described in the first reference when tests x and x is prime, searches a table T composed by the first 13 entries of A056915 to see if x is a strong pseudoprime to bases 2,3 and 5. A fast way to do that is to compute i = x mod 76057 mod 13, and compare x with T[i]. If x is not equal to T[i], x is prime.
Terms computed using table by Charles R Greathouse IV. See A056915.

Crossrefs

Cf. A055775.

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

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)

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

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)

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

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)

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

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)

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)))
Showing 1-10 of 24 results. Next