OFFSET
1,2
LINKS
Michael De Vlieger, Table of n, a(n) for n = 1..8238
MATHEMATICA
nn = 6000; c[_] := False; h[_] := 0; f[n_] := DivisorSigma[0, n];
a[1] = j = u = 1; r = 0;
{1}~Join~Rest@ Reap[Do[
If[c[j],
k = j + f[u]; h[j]++; h[u]--,
k = f[j]; c[j] = True; h[j]++ ];
u = Min[u, j]; Set[{a[n], j}, {k, k}]; While[h[u] == 0, u++];
If[k > r, r = k; Sow[n]], {n, 2, nn}] ][[-1, -1]]
CROSSREFS
KEYWORD
nonn
AUTHOR
Michael De Vlieger, Apr 09 2023
STATUS
approved