%I #25 Mar 18 2023 08:09:37
%S 1,6,10,15,12,20,45,18,40,75,24,50,105,14,30,21,28,36,63,56,48,147,98,
%T 54,189,70,60,231,22,42,33,44,72,99,88,78,143,66,26,39,84,52,91,112,
%U 104,455,80,126,35,90,154,55,100,132,135,110,96,165,130,102,85,120,34,51,108,68,153,114
%N Lexicographically earliest infinite sequence of distinct positive numbers such that, for n > 3, a(n) shares a factor with a(n-1) and a(n-2) but not with a(n-1) + a(n-2).
%C All terms must contain two or more distinct prime factors. If a(n) was a prime power then a(n+1) would contain the same prime factor, which in turn would imply that a(n) + a(n+1) is a multiple of the prime. But that would make finding a(n+2) impossible as any factor of a(n) would also be a factor of the sum.
%C To ensure the sequence is infinite a(n) must also contain a prime factor not in a(n-1). If this were not the case the sum a(n-1) + a(n) would be a multiple of the distinct prime factors of a(n), implying a(n+1) would not exist as any factor of a(n) would be a factor of the sum.
%C The last even term is a(114) = 210. As a(115) = 119 and a(116) = 255, the first occurrence of consecutive odd values, the resulting sum is even, so a(117) must be odd. This forces all subsequent terms to also be odd.
%C There is a concentration of terms at a(n) ~ 3.4*n. See the linked image. The only fixed point in the first 50000 terms is 14, although it is possible more exist.
%H Scott R. Shannon, <a href="/A361606/b361606.txt">Table of n, a(n) for n = 1..10000</a>
%H Michael De Vlieger, <a href="/A361606/a361606_2.png">Log log scatterplot of a(n)</a>, n = 1..2^14, showing squarefree composites in blue, numbers neither squarefree nor prime powers in red and gold, with gold representing numbers whose prime factors have multiplicity exceeding 1.
%H Michael De Vlieger, <a href="/A361606/a361606_3.png">Log log scatterplot of a(n)</a>, n = 1..2^14, accentuating even terms in red.
%H Michael De Vlieger, <a href="/A361606/a361606_4.png">Log log scatterplot of a(n)</a>, n = 1..2^14, with a color function showing least prime factor of a(n), where red = 2, yellow = 3, green = 5, blue = 7, violet = 11, and p | a(n) such that prime p > 11 uncolored, thus, black and tiny.
%H Michael De Vlieger, <a href="/A361606/a361606_5.png">Log log scatterplot of a(n)</a>, n = 1..2^14, with a color function showing the number of distinct prime factors of a(n), where red = 2, yellow = 3, green = 4, and blue = 5.
%H Scott R. Shannon, <a href="/A361606/a361606_1.png">Image of the first 50000 terms</a>. The green line is a(n) = n.
%e a(8) = 18 = 2*3*3 as a(6) = 20 = 2*2*5 and a(7) = 45 = 3*3*5 and a(6) + a(7) = 20 + 45 = 65 = 5*13. As the sum contains 5 as a factor a(8) cannot, but it must contain both 2 and 3 while containing a factor not in 45 = 3*3*5. The smallest unused number satisfying these conditions is 18.
%t nn = 120; u = s = 3; c[_] = False; MapIndexed[Set[{a[First[#2]], c[#1]}, {#1, True}] &, {1, 6, 10}]; Set[{i, j}, {a[s - 1], a[s]}]; While[Or[c[u], PrimePowerQ[u]], u++]; Do[k = u; While[Or[c[k], CoprimeQ[i, k], CoprimeQ[j, k], ! CoprimeQ[i + j, k]], k++]; Set[{a[n], c[k], i, j}, {k, True, j, k}]; If[a[n] == u, While[Or[c[u], PrimePowerQ[u]], u++]], {n, s + 1, nn}]; Array[a, nn] (* _Michael De Vlieger_, Mar 17 2023 *)
%Y Cf. A349493, A361102, A336957, A360519, A352867, A352774, A351001, A251622, A360209, A251604.
%K nonn
%O 1,2
%A _Scott R. Shannon_, Mar 17 2023