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
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..300
Washington Bomfim, A method to find bijections from a set of n integers to {0,1, ... ,n-1}
Eric Weisstein's World of Mathematics, Stirling's Approximation for 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
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Henry Bottomley, Jul 12 2000
EXTENSIONS
More terms from James A. Sellers, Jul 13 2000
STATUS
approved