OFFSET
2,1
LINKS
Amiram Eldar, Table of n, a(n) for n = 2..106
EXAMPLE
a(5) = greatest prime factor of 5^5 - 5! = greatest prime factor of 3125 - 120 = greatest prime factor of 3005 = 3005/5 = 601.
MATHEMATICA
Table[Max[First/@FactorInteger[n^n-n!]], {n, 2, 27}] (* Stefano Spezia, Jan 22 2023 *)
PROG
(PARI) a(n) = vecmax(factor(n^n - n!)[, 1]); \\ Michel Marcus, Jan 22 2023
CROSSREFS
KEYWORD
nonn
AUTHOR
Sebastian F. Orellana, Jan 19 2023
EXTENSIONS
More terms from Michel Marcus, Jan 22 2023
STATUS
approved