OFFSET
1,2
COMMENTS
Conjectured to be a permutation of the positive integers with primes in order.
Same as A351495 for the first 13 terms; diverges thereafter.
LINKS
Michael De Vlieger, Table of n, a(n) for n = 1..10000
Michael De Vlieger, Log log scatterplot of a(n), n = 1..2^14, showing primes in red.
FORMULA
If a(m) = 2*p where p is a prime > 5 which is not already a term, then a(m+2) = p.
EXAMPLE
a(4) = 4, least novel multiple of 2, the smallest prime which does not divide 3.
a(5) = 6, least novel multiple of 3, the smallest prime which does not divide 4.
There is only one occasion where the second condition of the definition applies, namely a(5) = 6, where 2 and 3 have already occurred; therefore a(6) = 5, the smallest prime which does not divide 6.
a(7) = 8 since 2 and 3 do not divide 5, and their least novel multiples are 8, and 9 respectively.
Since a(7) = 8, a(8) is the least novel multiple of 3 (9) or 5 (10), so a(8) = 9.
a(13) = 18 and 5, 7 are the primes which divide prior terms but don't divide 18. The least novel multiple of 5 is 20, and the least novel multiple of 7 is 7, therefore a(14) = 7.
MATHEMATICA
nn = 120; c[_] := False; m[_] := 1;
Array[Set[{a[#], c[#], m[#]}, {#, True, 2}] &, 3];
j = 3; s = {2}; r = Max[s]; c[3] = False;
Do[(If[Length[#] == 0, Set[k, NextPrime[r]],
Set[k, Min[#]]] &@
DeleteCases[Map[(While[c[# m[#]], m[#]++]; # m[#]) &, s], j];
s = Union[s, #];
If[Last[#] > r, r = Last[#]]) &@ FactorInteger[j][[All, 1]];
Set[{a[n], c[j], j}, {k, True, k}], {n, 4, nn}];
Array[a, nn] (* Michael De Vlieger, Dec 12 2023 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
David James Sycamore, Dec 12 2023
EXTENSIONS
More terms from Michael De Vlieger, Dec 12 2023
STATUS
approved