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 A351625 #25 May 09 2022 15:21:58 %S A351625 1,2,4,6,3,8,10,5,12,9,14,7,16,18,15,20,22,11,24,21,26,13,28,30,25,27, %T A351625 32,34,17,36,33,38,19,40,35,42,39,44,46,23,48,45,50,52,54,51,56,49,58, %U A351625 29,60,55,57,62,31,64,66,63,68,70,65,72,69,74,37,76,78,75,80,82,41,84,77,81,86,43,88 %N A351625 a(1) = 1, a(2) = 2; for n > 2, a(n) is the smallest positive number that has not appeared that shares a factor with the largest previous term. %C A351625 The sequence differs from A352976 after twenty-six terms. See the examples below. %C A351625 In the first 100000 terms the maximum run of even and odd terms is three and five respectively; it is unknown if these runs have a maximum number of terms or are unbounded. The fixed points beyond 2 are 15, 25, 35, and it is likely no more exist. The primes appear in their natural order, and it is conjectured that this is a permutation of the positive integers. %C A351625 From _Michael De Vlieger_, May 08 2022: (Start) %C A351625 Let u be the smallest missing number in a(1..n-1) and let record r = max(a(1..n-1)). %C A351625 Theorem: For odd prime q, r = mq -> q. Proof: generally, q may either divide or be coprime to r, but since equality and coprimality are prohibited by definition, primes may only divide records. This implies q serves as local minima, hence u > 2 is always an odd prime and r > 1 is always even. %C A351625 Since r is always even, r is nondecreasing and even numbers appear in natural order. Also, r = 2q -> q, similar to the Lagarias-Rains-Sloane chain in the EKG sequence but without the successor 3q. %C A351625 Theorem: a(n) = k such that k is odd iff least prime factor q | k and q | r. Proof: sequence definition demands smallest missing number such that (r,k) > 1. Otherwise, a(n) = a(n-1) + 2, since (a(n-1), a(n-1) + 2) > 1, and all smaller even numbers have already appeared. %C A351625 All even numbers and primes appear, and every odd composite k has a least prime factor that admits k into the sequence on the occasion of (r,k) > 1. %C A351625 There are 3 trajectories in scatterplot for a(n) > 1. The trajectory with lowest apparent slope is that of the primes, i.e., local minima. The trajectory with highest slope is that of records, i.e., even numbers, and the remaining numbers are odd composites. (End) %H A351625 Michael De Vlieger, <a href="/A351625/a351625_1.png">Annotated log-log scatterplot of a(n)</a>, n = 1..2^14, showing records (even numbers) in red, primes in green, and fixed points in gold. %H A351625 Scott R. Shannon, <a href="/A351625/a351625.png">Image of the first 100000 terms</a>. The green line is y = n. %e A351625 a(6) = 8 as the largest value of all previous terms is a(4) = 6, and 8 is the smallest unused number that shares a factor with 6. %e A351625 a(27) = 32 as the largest value of all previous terms is a(24) = 30, and 32 is the smallest unused number that shares a factor with 30. Note that A352976(27) = 33 as it must share a factor with max(25,27) = 27. %t A351625 nn = 120; c[_] = 0; Array[Set[{a[#], c[#]}, {2^(# - 1), #}] &, 3]; u = 3; Do[k = u; While[Nand[c[k] == 0, ! CoprimeQ[k, r]], k++]; Set[{a[i], c[k]}, {k, i}]; If[k > r, r = k]; If[k == u, While[c[u] > 0, u++]], {i, L + 1, nn}]; Array[a, nn] (* _Michael De Vlieger_, May 08 2022 *) %Y A351625 Cf. A352976, A351626, A352943, A352968, A064413, A270139, A084937, A336957, A098550. %K A351625 nonn %O A351625 1,2 %A A351625 _Scott R. Shannon_, May 04 2022