OFFSET
1,2
COMMENTS
The terms are concentrated along the line a(n) = n, resulting in seven-hundred six fixed points in the first 50000 terms. These begin 1, 2, 4, 7, 19, 43, 50, 134, ... . See the linked image. In the same range the smallest unseen number is 46410, suggesting all numbers will eventually appear.
LINKS
Scott R. Shannon, Table of n, a(n) for n = 1..10000.
Scott R. Shannon, Image of the first 50000 terms. The green line is a(n) = n.
EXAMPLE
a(2) = 2 as a(1) + 2 = 1 + 2 = 3 while a(1) * 2 = 1 * 2 = 2, both of which have one distinct prime factor.
a(3) = 10 as a(2) + 10 = 2 + 10 = 12 while a(2) * 10 = 2 * 10 = 20, both of which have two distinct prime factors.
MATHEMATICA
nn = 120;
c[_] := False; f[x_] := PrimeNu[x]; a[1] = j = 1; c[1] = True; u = 2;
Do[k = u; While[Or[c[k], f[j + k] != f[j k]], k++];
Set[{a[n], c[k], j}, {k, True, k}];
If[k == u, While[c[u], u++]], {n, 2, nn}];
Array[a, nn] (* Michael De Vlieger, Jul 17 2023 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Scott R. Shannon, Jul 16 2023
STATUS
approved