OFFSET
1,2
LINKS
Michael De Vlieger, Table of n, a(n) for n = 1..10000
MATHEMATICA
nn = 2^20; c[_] := False; m[_] := 0; s = 0; a[1] = j = 1;
c[0] = c[1] = True;
{1}~Join~Reap[Monitor[Do[p = Prime[n - 1]; r = Mod[j, p];
While[Set[k, p m[p] + r]; c[k], m[p]++];
Set[{c[k], j}, {True, k}];
If[k > s, s = k; Sow[n]], {n, 2, nn}], n] ][[-1, 1]] (* Michael De Vlieger, Mar 05 2024 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Mar 05 2024
STATUS
approved