OFFSET
1,6
COMMENTS
If n is prime, a(n)=1.
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
EXAMPLE
A001414(6) = 2+3 = 5, 6 mod 5 = 1, 6 mod 1 = 0 so a(6) = 2.
MAPLE
f:= proc(n) local s, t;
s:= convert(map(convert, ifactors(n)[2], `*`), `+`);
for t from 1 do
s:= n mod s;
if s = 0 then return t fi
od
end proc:
f(1):= 0:
map(f, [$1..200]);
MATHEMATICA
sopfr[n_] := If[n == 1, 0, Total[Times @@@ FactorInteger[n]]];
f[n_] := Module[{s, t}, s = sopfr[n]; For[t = 1, True, t++, s = Mod[n, s]; If[s == 0, Return [t]]]]; f[1] = 0;
Array[f, 200] (* Jean-François Alcover, Aug 22 2020, after Maple *)
CROSSREFS
KEYWORD
nonn
AUTHOR
J. M. Bergot and Robert Israel, Nov 18 2019
STATUS
approved