OFFSET
3,1
LINKS
Amiram Eldar, Table of n, a(n) for n = 3..81
Dario Alpern, Factorization using the Elliptic Curve Method.
Amiram Eldar, Table of prime factors of A000166(n) for n = 3..81 (calculated with Dario Alpern's ECM)
FORMULA
EXAMPLE
For n=5 (the third member of the sequence), the number of derangements is 44, thus a(5) = 11, the largest prime factor of 44.
MATHEMATICA
Table[FactorInteger[Subfactorial[n]][[-1, 1]], {n, 3, 30}] (* Amiram Eldar, Jul 31 2022 *)
PROG
(PARI) a(n) = {fn = factor(round(n!/exp(1))); fn[#fn[, 1], 1]} \\ Michel Marcus, Jun 01 2013
CROSSREFS
KEYWORD
nonn
AUTHOR
Albert Moes (albertmoes(AT)freeler.nl), Nov 20 2008
EXTENSIONS
Corrected and extended by Michel Marcus, Jun 01 2013
STATUS
approved