OFFSET
1,4
COMMENTS
Differs from A365331 at n = 1, 36, 72, 100, ... .
LINKS
FORMULA
MATHEMATICA
a[n_] := Module[{e = FactorInteger[n][[;; , 2]]}, Max[(If[OddQ[#], #, # + 1]) & /@ e]]; a[1] = 0; Array[a, 100]
PROG
(PARI) a(n) = if(n == 1, 0, vecmax(apply(x -> if(x % 2, x, x+1), factor(n)[, 2])));
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Amiram Eldar, Aug 13 2024
STATUS
approved