|
|
A329656
|
|
Starting at k = A001414(n), iterate k -> n mod k until k=0. a(n) is the number of steps taken.
|
|
2
|
|
|
0, 1, 1, 1, 1, 2, 1, 2, 2, 3, 1, 3, 1, 4, 3, 1, 1, 2, 1, 2, 2, 4, 1, 2, 2, 4, 1, 3, 1, 1, 1, 2, 3, 4, 4, 2, 1, 4, 4, 3, 1, 2, 1, 3, 2, 4, 1, 2, 2, 2, 5, 2, 1, 4, 4, 2, 5, 4, 1, 1, 1, 4, 4, 2, 4, 2, 1, 4, 3, 1, 1, 1, 1, 4, 3, 4, 4, 2, 1, 2, 2, 4, 1, 1, 5, 4, 6, 3, 1, 3, 4, 3, 4, 4, 5, 3, 1, 2, 3
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,6
|
|
COMMENTS
|
If n is prime, a(n)=1.
|
|
LINKS
|
|
|
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;
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|