OFFSET
1,2
COMMENTS
From the definition it follows that both terms i,j in M cannot be prime, for if {i,j} is the first occurrence of two primes in M, then h, the term preceding i cannot be prime. With h nonprime and i prime we have either i|h or i!|h, and in either case j is a multiple of p, hence not prime.
Conjectured to be a permutation of the positive integers with the primes occurring in order.
LINKS
Michael De Vlieger, Log log scatterplot of a(n), n = 1..2^20.
Michael De Vlieger, Log log scatterplot of a(n), n = 1..2^14, showing primes in red, composite prime powers in gold, squarefree composites in green, and numbers neither squarefree nor prime powers in blue, highlighting numbers in the last category that are also squareful in light blue.
EXAMPLE
M(1) = {1,2}; 2 prime and 2!|1-->a(3) = 4 (least novel multiple of 2).
M(2) = {2,4}, and 2|4--> a(4) = 2*4 = 8.
M(4) = {4,8}, no prime term --> a(5) = 3, least novel multiple of the smallest prime which does not divide 4*8 = 32.
M(8) = {8,3}, 3 prime!|8 -->a(6) = 6, least novel multiple of 3.
M(3) = {3,6}, 3|6--> a(7) = 3*6 = 18.
M(6) = {6,18} both terms nonprime--> a(8) = 5, least novel multiple of the smallest prime which does not divide 6*18 = 108.
MATHEMATICA
nn = 120; c[_] := False; m[_] := 1;
q[x_] := Block[{qq}, qq = 2;
While[Divisible[x, qq], qq = NextPrime[qq]]; qq];
Array[Set[{a[#], c[#], m[#]}, {#, True, 2}] &, 2];
Set[{i, j}, {a[1], a[2]}];
Do[If[Xor[PrimeQ[i], PrimeQ[j]],
Set[{k, p}, SortBy[{i, j}, PrimeQ]];
If[Divisible[k, p],
Set[k, i*j],
While[c[Set[k, p m[p]]], m[p]++]],
Set[k, q[i*j]]; While[c[k m[k]], m[k]++]; k *= m[k]];
Set[{a[n], c[k], i, j}, {k, True, j, k}],
{n, 3, nn}];
Array[a, nn] (* Michael De Vlieger, Nov 29 2023 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
David James Sycamore, Nov 29 2023
EXTENSIONS
More terms from Michael De Vlieger, Nov 29 2023
STATUS
approved