OFFSET
2,7
COMMENTS
a(n) = 0 if n is prime.
LINKS
Robert Israel, Table of n, a(n) for n = 2..10000
MAPLE
dcat:= proc(L) local i, x;
x:= L[-1];
for i from nops(L)-1 to 1 by -1 do
x:= 10^(1+ilog10(x))*L[i]+x
od;
x
end proc:
f:= proc(n) local F;
F:= sort(ifactors(n)[2], (a, b) -> a[1] < b[1]);
dcat(map(t -> t[1]$t[2], F)) mod n;
end proc:
g:= proc(n) option remember;
if isprime(n) then 0 else 1 + procname(f(n)) fi
end proc:
g(0):= 0: g(1):= 0:
map(g, [$1..1000]);
CROSSREFS
KEYWORD
nonn
AUTHOR
J. M. Bergot and Robert Israel, Jan 13 2021
STATUS
approved