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

A055775 a(n) = floor(n^n / n!).

Original entry on oeis.org

1, 1, 2, 4, 10, 26, 64, 163, 416, 1067, 2755, 7147, 18613, 48638, 127463, 334864, 881657, 2325750, 6145596, 16263866, 43099804, 114356611, 303761260, 807692034, 2149632061, 5726042115, 15264691107, 40722913454, 108713644516
Offset: 0

Views

Author

Henry Bottomley, Jul 12 2000

Keywords

Comments

Stirling's approximation for n! suggests that this should be about e^n/sqrt(pi*2n). Bill Gosper has noted that e^n/sqrt(pi*(2n+1/3)) is significantly better.
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
There are n^n distinct functions from [n] to [n] or sequences on n symbols of length n, the number of those sequences having n distinct symbols is n!. So the probability P(n) of bijection is n!/n^n. The expected value of the number of functions that we pick until we found a bijection is the reciprocal of P(n), or n^n/n!. - Washington Bomfim, Mar 05 2012

Examples

			a(5)=26 since 5^5=3125, 5!=120, 3125/120=26.0416666...
		

Crossrefs

Programs

Formula

a(n) = floor(A000312(n)/A000142(n)).

Extensions

More terms from James Sellers, Jul 13 2000

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

A235496 a(n) = round(n^n/n!) where round(1/2)=1.

Original entry on oeis.org

1, 1, 2, 5, 11, 26, 65, 163, 416, 1068, 2756, 7148, 18614, 48639, 127463, 334865, 881658, 2325751, 6145597, 16263866, 43099804, 114356611, 303761260, 807692035, 2149632061, 5726042115, 15264691107, 40722913454, 108713644516, 290404350963, 776207020880
Offset: 0

Views

Author

Vincenzo Librandi, Jan 15 2014

Keywords

Comments

We have two versions of this sequence, this and A240571, because there is no universal agreement on how to round a number like 9/2. - N. J. A. Sloane, Dec 13 2015

Crossrefs

See A240571 for another version.

Programs

  • Magma
    [Round(n^n/Factorial(n)): n in [1..40]];
    
  • Maple
    a:= n-> round(n^n/n!):
    seq(a(n), n=0..32);  # Alois P. Heinz, Dec 13 2015
  • Mathematica
    Table[Floor[n^n/n! + 1/2], {n, 40}]
  • PARI
    s=[]; for(n=1, 30, s=concat(s, round(n^n/n!))); s \\ Colin Barker, Jan 19 2014

Formula

a(n) = Round(A000312(n)/A000142(n)).

Extensions

Name clarified by Sean A. Irvine, Jan 12 2025

A127634 a(n) = 3^(n-1) - ceiling(n^n/n!).

Original entry on oeis.org

0, 1, 4, 16, 54, 178, 565, 1770, 5493, 16927, 51901, 158533, 482802, 1466859, 4448104, 13467249, 40720970, 122994566, 371156622, 1119161662, 3372427789, 10156591942, 30573367574, 91993546765, 276703494365, 832023918335, 2501142914874, 7516883840470
Offset: 1

Views

Author

N. J. A. Sloane, Apr 03 2007

Keywords

Comments

Theorem: 3^(n-1) > n^n/n! for n >= 3.

References

  • D. S. Mitrinovic, Analytic Inequalities, Springer-Verlag, 1970; p. 193, 3.1.21.

Crossrefs

Programs

  • Magma
    [3^(n-1)-Ceiling(n^n/Factorial(n)): n in [1..30]]; // Vincenzo Librandi, Jul 06 2017
  • Maple
    seq(3^(n-1)-ceil(n^n/n!),n=1..50); # Robert Israel, Jul 06 2017
  • Mathematica
    Table[3^(n-1) - Ceiling[n^n / n!], {n, 30}] (* Vincenzo Librandi, Jul 06 2017 *)
  • PARI
    a(n) = 3^(n-1) - ceil(n^n/n!); \\ Michel Marcus, Jul 06 2017
    
Showing 1-4 of 4 results.