This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A377002 #8 Oct 16 2024 21:31:25 %S A377002 9,20,60,78,81,117,120,136,244,261,385,532,608,1568,2247,2704,2949, %T A377002 4352,5952,6084,6564,10972,15688,17524,20356,21066,21868,42771,58045, %U A377002 92034,103660,108333,145203,196869,201963,225021,226626,232300,263133,309603,431640,497380 %N A377002 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 A377002 Up to 10^7, the longest process takes place with 823002 which needs 26 steps. %e A377002 k = 78 (7 steps): %e A377002 (78*79/2-sigma(78)) mod 78 = 27; %e A377002 (27*28/2-sigma(27)) mod 27 = 14; %e A377002 (14*15/2-sigma(14)) mod 14 = 11; %e A377002 (11*12/2-sigma(11)) mod 11 = 10; %e A377002 (10*11/2-sigma(10)) mod 10 = 7; %e A377002 (7*8/2-sigma(7)) mod 7 = 6; %e A377002 (6*7/2-sigma(6)) mod 6 = 3 and 27 + 14 + 11 + 10 + 7 + 6 + 3 = 78. %p A377002 with(numtheory): P:=proc(q) local a,b,n,v; v:=[]; %p A377002 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 A377002 if b=0 then break; else a:=a+b; fi; od; if a=n then v:=[op(v),n]; fi; %p A377002 od; op(v); end: P(5*10^5); %Y A377002 Cf. A000203, A024816, A377001. %K A377002 easy,nonn %O A377002 1,1 %A A377002 _Paolo P. Lava_, Oct 12 2024