login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A055775
a(n) = floor(n^n / n!).
25
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,3
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
FORMULA
a(n) = floor(A000312(n)/A000142(n)).
EXAMPLE
a(5)=26 since 5^5=3125, 5!=120, 3125/120=26.0416666...
MATHEMATICA
Join[{1}, Table[Floor[n^n/n!], {n, 30}]] (* Vladimir Joseph Stephan Orlovsky, Jan 15 2009 *)
PROG
(Magma) [Floor((n^n)/Factorial(n)): n in [0..30]]; // Vincenzo Librandi, Aug 22 2011
(PARI) a(n)=n^n\n! \\ Charles R Greathouse IV, Apr 17 2012
KEYWORD
nonn,easy
AUTHOR
Henry Bottomley, Jul 12 2000
EXTENSIONS
More terms from James A. Sellers, Jul 13 2000
STATUS
approved