This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A373545 #23 Jun 13 2024 02:01:30 %S A373545 1,2,3,6,5,10,7,14,9,12,11,22,13,26,15,18,17,34,19,38,21,24,23,46,25, %T A373545 20,27,30,29,58,31,62,33,36,35,28,37,74,39,42,41,82,43,86,45,40,47,94, %U A373545 49,56,51,48,53,106,55,44,57,54,59,118,61,122,63,60,67,134,65,50,69,66,71,142,73,146 %N A373545 a(1) = 1, a(2) = 2; for n > 2, a(n) is the smallest unused positive number that shares a factor with a(n-1) if a(n-1) is odd otherwise is coprime to a(n-1) if a(n-1) is even. %C A373545 The terms studied are all concentrated along lines of different gradient; the odd terms all being on the line a(n) = n or very close to it, while the even terms are distributed among the other lines dependent on the number of prime factors they contain. It is conjectured that this behavior is true for all n. The topmost line contains even semiprimes while the lower lines, those with gradient less than 1, contain powers of 2 multiplied by a larger single prime. However the topmost of these lower lines, which is more diffuse, also contains all other even numbers. Also noticeable is some of the lower lines terminating after which these values appear to move into the line contains all other even numbers. %C A373545 Many odd terms are fixed points, this not occurring only when such a number would share a factor with the previous even number. This first occurs at a(65) = 67, when 65 cannot be chosen as it would share a factor with a(64) = 60. %C A373545 The term selection rules would allow for consecutive odd numbers although this never occurs in the terms studied and is unlikely to ever occur. Likewise for the terms studied all primes appear in their natural order. No power of 2, other than 2 itself, can be a term. %C A373545 From _Michael De Vlieger_, Jun 11 2024: (Start) %C A373545 Conjecture: Odd prime p precedes 2*p. %C A373545 Conjecture: Odd prime p appears for odd n, but additionally, tends to occupy a(n) such that n mod A002110(k) is a reduced residue of the largest A002110(k) < n. Thus, a(n) = p for n <= p. Example, a(65) = 67 is displaced. However, generally primes represent fixed points. (End) %H A373545 Scott R. Shannon, <a href="/A373545/b373545.txt">Table of n, a(n) for n = 1..10000</a> %H A373545 Michael De Vlieger, <a href="/A373545/a373545_2.png">Plot f(a(n)) in rows of 210 terms</a>, n = 1..16380, where color function f renders primes in red, perfect prime powers in gold, squarefree composites in greens, and numbers neither squarefree nor prime powers in blue or purple, where purple additionally signifies powerful numbers that are not prime powers. Bright green represents a primorial, yellow green an even squarefree semiprime, olive green an odd squarefree semiprime, and dark green other squarefree composites. Shows pattern of primes a(n) = p followed by even squarefree semiprimes 2*p, generally where n mod A002110(k) is a reduced residue. The lower image plots f(n), only showing primes in their place for comparison. %H A373545 Scott R. Shannon, <a href="/A373545/a373545.png">Image of the first 100000 terms</a>. Numbers with one, two, three, four, or five and more prime factors, counted with multiplicity, are show as red, yellow, green, blue and violet respectively. The white line is a(n) = n. %H A373545 Scott R. Shannon, <a href="/A373545/a373545_1.png">Image of the first 100000 terms</a>. As above except here the colors show the number of distinct prime factors. %e A373545 a(7) = 7 as a(6) = 10 is an even number and 7 is the smallest unused positive that is coprime to 10. %t A373545 kk = 2; nn = 120; c[_] := False; Array[Set[{a[#], c[#]}, {#, True}] &, kk]; %t A373545 j = a[kk]; u = kk + 1; %t A373545 Do[If[OddQ[j], %t A373545 If[PrimePowerQ[j], %t A373545 p = FactorInteger[j][[1, 1]]; %t A373545 k = #1 + Boole[#2 > 0] & @@ QuotientRemainder[u, p]; %t A373545 While[c[k p], k++]; k *= p, %t A373545 k = u; While[Or[c[k], CoprimeQ[j, k]], k++]], %t A373545 k = u; While[Or[c[k], ! CoprimeQ[j, k]], k++] ]; %t A373545 Set[{a[n], c[k], j}, {k, True, k}]; %t A373545 If[k == u, While[c[u], u++]], {n, kk + 1, nn}]; %t A373545 Array[a, nn] (* _Michael De Vlieger_, Jun 11 2024 *) %Y A373545 Cf. A373546, A064413, A005843, A005408. %K A373545 nonn %O A373545 1,2 %A A373545 _Scott R. Shannon_, Jun 09 2024