OFFSET
1,4
LINKS
FORMULA
MATHEMATICA
a[n_] := Max[Join[{0}, Select[FactorInteger[n][[;; , 2]], # <= 2 &]]]; a[1] = 0; Array[a, 100]
PROG
(PARI) a(n) = {my(e = select(x -> x <= 2, factor(n)[, 2])); if(#e == 0, 0, vecmax(e)); }
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Amiram Eldar, Aug 31 2024
STATUS
approved