OFFSET
0,4
COMMENTS
a(n) is the number of functions from {1,2,...,n} into {1,2,...,n} that have no fixed points.
The probability that a random function from {1,2,...,n} into {1,2,...,n} has no fixed point is equal to a(n)/n^n; it tends to 1/e when n tends to infinity. - Robert FERREOL, Mar 29 2017
LINKS
Harry J. Smith, Table of n, a(n) for n = 0..100
Mustafa Obaid et al., The number of complete exceptional sequences for a Dynkin algebra, arXiv preprint arXiv:1307.7573 [math.RT], 2013.
FORMULA
a(n) = A007778(n-1).
E.g.f.: x/(T(x)*(1-T(x))) (where T(x) is Euler's tree function, the E.g.f. for n^(n-1)) (see A000169).
a(n) = Sum_{k=0..n} (-1)^k*binomial(n,k)*n^(n-k). - Robert FERREOL, Mar 28 2017
MATHEMATICA
Table[(n-1)^n, {n, 0, 20}] (* Harvey P. Dale, Jan 03 2015 *)
PROG
(PARI) { for (n=0, 100, write("b065440.txt", n, " ", (n - 1)^n) ) } \\ Harry J. Smith, Oct 19 2009
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Len Smiley, Nov 17 2001
STATUS
approved