OFFSET
1,1
LINKS
Michael De Vlieger, Table of n, a(n) for n = 1..10000
Michael De Vlieger, Log log scatterplot of A109890(n), n = 1..10^5, showing primes in red and nonprimes in dark blue.
MATHEMATICA
nn = 240; c[_] := False; a[1] = 1; a[2] = 2; s = 3; c[1] = c[2] = True;
{2}~Join~Reap[Monitor[Do[k = SelectFirst[Divisors[s], ! c[#] &];
c[k] = True; s += k;
If[PrimeQ[k], Sow[n]], {n, 3, nn}], n] ][[-1, 1]] (* Michael De Vlieger, Apr 27 2024 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Oct 30 2005
STATUS
approved