login
A367750
a(1,2) = 1,2. let i,j represent a(n-2), a(n-1) respectively and let M(i) = {i,j}. For n > 2, if one of i,j is prime (p), and the other (m) is not, then if p!|m, a(n) is the least novel multiple of p. If p|m, a(n) = p*m. If both terms in M are nonprime a(n) is the least novel multiple of the smallest prime which does not divide i*j.
1
1, 2, 4, 8, 3, 6, 18, 5, 10, 50, 9, 7, 14, 98, 12, 15, 21, 16, 20, 24, 28, 25, 27, 22, 30, 35, 11, 33, 363, 26, 40, 36, 42, 45, 44, 49, 39, 32, 55, 48, 56, 60, 66, 63, 65, 34, 51, 70, 77, 54, 75, 84, 88, 80, 57, 91, 38, 69, 85, 46, 72, 90, 105, 99, 52, 95, 78
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
Sequence in context: A344534 A050170 A087089 * A197382 A332521 A246363
KEYWORD
nonn
AUTHOR
EXTENSIONS
More terms from Michael De Vlieger, Nov 29 2023
STATUS
approved