OFFSET
0,3
COMMENTS
The sequence can only increase for two consecutive terms at most as if a(n) is even then a(n+1) will be a(n)/2, while if a(n) is odd and a(n+1) is prime then a(n+2) will be even and thus a(n+3) = a(n+2)/2.
For the first 100 million terms the lowest number not to have appeared is 888. It is likely all numbers eventually appear although this is unknown.
LINKS
Scott R. Shannon, Graph of the first 10 million terms.
EXAMPLE
a(3) = 6 as a(2) = 3 which is prime thus a(3) = 3 + 3 = 6.
a(4) = 3 as a(3) = 6 which has the smallest divisor 2 thus a(4) = 6/2 = 3.
a(11) = 5 as a(10) = 15 which has the smallest divisor 3 thus a(11) = 15/3 = 5.
MATHEMATICA
a[0] = 0; a[1] = 1; a[n_] := a[n] = If[CompositeQ[a[n - 1]], a[n - 1]/FactorInteger[a[n - 1]][[1, 1]], a[n - 1] + n]; Array[a, 100, 0] (* Amiram Eldar, Sep 30 2020 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Scott R. Shannon, Sep 29 2020
STATUS
approved