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
a(n) is the determinant of the unipotent Sylvester-Kac tridiagonal matrix of order n having main diagonal [0, 2, ..., 2*(n-1)], superdiagonal [1, 2, ..., n-1], and [subdiagonal 1-n, 2-n, ..., -1] (see Du and da Fonseca link). - Stefano Spezia, Nov 20 2025
LINKS
Harry J. Smith, Table of n, a(n) for n = 0..100
Zhibin Du and Carlos M. da Fonseca, On an infinite family of unipotent Sylvester-Kac-like matrices, Notes on Number Theory and Discrete Mathematics, Volume 31, 2025, Number 4, Pages 846-850. See section 2.
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
a(n) = Sum_{k=0..n} (-1)^k*binomial(n+2,k+2)*(k+1)*(2*k+n+3)^n. - Vladimir Kruchinin, Aug 13 2025
MATHEMATICA
Table[(n-1)^n, {n, 0, 20}] (* Harvey P. Dale, Jan 03 2015 *)
PROG
(PARI) a(n) = { (n - 1)^n } \\ Harry J. Smith, Oct 19 2009
(Magma)
A065440:= func< n | (n-1)^n >;
[A065440(n): n in [0..30]]; // G. C. Greubel, Mar 23 2025
(SageMath)
def A065440(n): return (n-1)**n
print([A065440(n) for n in range(31)]) # G. C. Greubel, Mar 23 2025
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Len Smiley, Nov 17 2001
STATUS
approved
