OFFSET
1,1
LINKS
Michael De Vlieger, Table of n, a(n) for n = 1..2500
Michael De Vlieger, Log log scatterplot of A124652(n), n = 1..25000, showing primes in red.
FORMULA
Proper subset of A372028.
EXAMPLE
Let b(x) = A124652(x).
Table of first terms.
n a(n) b(a(n))
-----------------
1 2 2
2 3 3
3 5 5
4 11 11
5 12 7
6 20 31
7 24 13
8 28 19
9 29 17
10 33 37
11 42 29
12 43 41
...
MATHEMATICA
nn = 300; c[_] := False;
rad[x_] := rad[x] = Times @@ FactorInteger[x][[All, 1]];
f[x_] := Select[Range[x], Divisible[x, rad[#]] &];
Array[Set[{a[#], c[#]}, {#, True}] &, 2]; s = a[1] + a[2];
{2}~Join~Reap[Do[r = f[s]; k = SelectFirst[r, ! c[#] &];
If[PrimeQ[k], Sow[i]]; c[k] = True;
s += k, {i, 3, nn}] ][[-1, 1]]
CROSSREFS
KEYWORD
nonn
AUTHOR
Michael De Vlieger, Apr 29 2024
STATUS
approved