OFFSET
1,1
COMMENTS
Up to 10^7, the longest process takes place with 2813292 which needs 23 steps.
E.g. k = 12 -> sigma(12) mod 12 = 4; sigma(4) mod 4 = 3 and 4 * 3 = 12.
EXAMPLE
k = 72 (2 steps):
sigma(72) mod 72 = 51;
sigma(51) mod 51 = 21 and 51 + 21 = 72.
k = 147 (6 steps):
sigma(147) mod 147 = 81;
sigma(81) mod 81 = 40;
sigma(40) mod 40 = 10;
sigma(10) mod 10 = 8;
sigma(8) mod 8 = 7;
sigma(7) mod 7 = 1 and 81 + 40 + 10 + 8 + 7 + 1 = 147.
MAPLE
with(numtheory): P:=proc(q) local a, b, n, v; v:=[];
for n from 1 to q do a:=0; b:=n; while a<n do b:=(sigma(b) mod b); if b=0 then break;
else a:=a+b; fi; od; if a=n then v:=[op(v), n]; fi; od; op(v); end: P(10^5);
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Paolo P. Lava, Oct 12 2024
STATUS
approved