OFFSET
1,1
COMMENTS
If for some n, A001414(a(n-1)) is a prime p not seen before, then a(n)=p and a(n+1)=2*p. If the lesser of a twin prime pair is a(n), the greater is a(n+2).
The numbers not appearing in the first 10^7 terms are 1, 3, 37957, 37963, 38557, 39301, 40237, 40343, 40351, 40357, ...; it seems that all numbers other than 1 and 3 eventually appear. - Charles R Greathouse IV, Apr 09 2018
LINKS
Michael De Vlieger, Table of n, a(n) for n = 1..10000
Charles R Greathouse IV, Table of n, a(n) for n = 1..702396
EXAMPLE
MATHEMATICA
Nest[Append[#, Block[{k = 1, m = Total@ Flatten@ Map[ConstantArray[#1, #2] & @@ # &, FactorInteger@ Last@ #]}, While[! FreeQ[#, k m], k++]; k m]] &, {2}, 74] (* Michael De Vlieger, Mar 14 2018 *)
PROG
(PARI) sopfr(n, f=factor(n))=sum(i=1, #f[, 1], f[i, 1]*f[i, 2])
first(n)=my(v=vector(n), s=[2], t); v[1]=2; for(m=2, n, t=sopfr(v[m-1]); forstep(k=t, t*m, t, if(setsearch(s, k), next); s=setunion(s, [k]); v[m]=k; break)); v \\ Charles R Greathouse IV, Apr 06 2018
CROSSREFS
KEYWORD
nonn,look
AUTHOR
David James Sycamore, Mar 13 2018
STATUS
approved