Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #8 Oct 16 2024 21:31:25
%S 9,20,60,78,81,117,120,136,244,261,385,532,608,1568,2247,2704,2949,
%T 4352,5952,6084,6564,10972,15688,17524,20356,21066,21868,42771,58045,
%U 92034,103660,108333,145203,196869,201963,225021,226626,232300,263133,309603,431640,497380
%N Integers k equal to the sum over A024816(t) mod t, for some steps, starting with t = k and then using the result to feed the next calculation.
%C Up to 10^7, the longest process takes place with 823002 which needs 26 steps.
%e k = 78 (7 steps):
%e (78*79/2-sigma(78)) mod 78 = 27;
%e (27*28/2-sigma(27)) mod 27 = 14;
%e (14*15/2-sigma(14)) mod 14 = 11;
%e (11*12/2-sigma(11)) mod 11 = 10;
%e (10*11/2-sigma(10)) mod 10 = 7;
%e (7*8/2-sigma(7)) mod 7 = 6;
%e (6*7/2-sigma(6)) mod 6 = 3 and 27 + 14 + 11 + 10 + 7 + 6 + 3 = 78.
%p with(numtheory): P:=proc(q) local a,b,n,v; v:=[];
%p for n from 1 to q do a:=0; b:=n; while a<n do b:=((b*(b+1)/2-sigma(b)) mod b);
%p if b=0 then break; else a:=a+b; fi; od; if a=n then v:=[op(v),n]; fi;
%p od; op(v); end: P(5*10^5);
%Y Cf. A000203, A024816, A377001.
%K easy,nonn
%O 1,1
%A _Paolo P. Lava_, Oct 12 2024