OFFSET
2,1
LINKS
Amiram Eldar, Table of n, a(n) for n = 2..115
MAPLE
pf := n -> NumberTheory:-PrimeFactors(n): a := n -> max(pf(n^n - n));
seq(a(n), n = 2..27); # Peter Luschny, Apr 27 2024
MATHEMATICA
Table[f = FactorInteger[n^n-n]; f[[Length[f]]][[1]], {n, 2, 25}] (* Vaclav Kotesovec, Apr 26 2024 *)
PROG
(Python)
from sympy import primefactors
def A372229(n): return max(max(primefactors(n), default=1), max(primefactors(n**(n-1)-1), default=1)) # Chai Wah Wu, Apr 27 2024
CROSSREFS
KEYWORD
nonn
AUTHOR
Tyler Busby, Apr 23 2024
STATUS
approved