cp's OEIS Frontend

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.

A352867 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 a(n-1), a(n-2), and a(n-1)+a(n-2).

This page as a plain text file.
%I A352867 #26 Jun 01 2025 17:41:23
%S A352867 1,2,6,4,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46,
%T A352867 48,50,52,54,56,58,60,62,64,66,68,70,72,74,76,78,80,82,84,86,88,90,92,
%U A352867 94,96,98,100,102,104,106,108,110,112,105,7,21,35,49,63,77,91,119,126,133,140,114,116
%N A352867 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 a(n-1), a(n-2), and a(n-1)+a(n-2).
%C A352867 The sequence shows long runs of even terms differing by 2 which are eventually broken by a number with a product of odd primes less than the last even term. The term after such run-breaking terms is often significantly less than the previous terms, leading to the sequence showing abrupt dips in its values. In the first 200000 terms the longest even-numbered run is 106 terms, and it is likely these runs can grow arbitrarily long. Likewise long runs of odd terms also exist, the longest such run being 133 terms in the same range. However unlike the even-numbered runs which increase by 2 each term the odd-numbered runs increase with differing amounts between each term. Between the large dips in value the majority of terms are concentrated along a line with gradient ~ 1.125. See the linked images.
%C A352867 It takes many terms for the primes to appear, e.g. a(166) = 3, a(239) = 5, a(1841) = 23, a(13325) = 61, a(158205) = 191. They do not appear in their natural order.
%C A352867 Other than the first few terms the only fixed point up to 200000 terms is 63. It is possible more exist although this is unknown. The sequence is almost certainly a permutation of the positive integers.
%H A352867 Scott R. Shannon, <a href="/A352867/b352867.txt">Table of n, a(n) for n = 1..10000</a>
%H A352867 Michael De Vlieger, <a href="/A352867/a352867_3.png">Annotated log-log scatterplot of a(n)</a>, n = 1..2^10, showing intervals of terms with the same g = A007947(gcd(a(n-2), a(n-1), a(n-2)+a(n-1))) in a color function where g = 2 is black, g = 3 is red, g = 5 orange, etc. The first term in the intervals are noted in black, their index in italic below the point.
%H A352867 Scott R. Shannon, <a href="/A352867/a352867_1.png">Image of the first 1000 terms</a>. The green line is y = n.
%H A352867 Scott R. Shannon, <a href="/A352867/a352867.png">Image of the first 200000 terms</a>.
%H A352867 Scott R. Shannon, <a href="/A352867/a352867_2.png">Image of the first 200000 terms with parity</a>. White are even terms, red are odd terms.
%e A352867 a(4) = 4 as a(2)=2, a(3)=6, a(2)+a(3)=8, and 4 is the smallest unused number that shares a factor with 2, 6, and 8.
%e A352867 a(58) = 105 as a(56)=110, a(57)=112, a(56)+a(57)=222, and 105 = 3*5*7 is the smallest unused number that shares a factor with 110, 112, and 222. This breaks a run of fifty-three consecutive even terms differing by 2.
%e A352867 a(59) = 7 as a(57)=112, a(58)=105, a(57)+a(58)=217, and 7 is the smallest unused number that shares a factor with 112, 105, and 217. This is the second prime to appear after a(2)=2.
%t A352867 nn = 71; u = 1; c[_] = 0; MapIndexed[Set[{a[First[#2]], c[#1]}, {#1, First[#2]}] &, {1, 2, 6}]; While[c[u] > 0, u++]; Do[k = u; While[Nand[c[k] == 0, ! CoprimeQ[#1, k], ! CoprimeQ[#2, k], ! CoprimeQ[#3, k]], k++] & @@ {#1, #2, #1 + #2} & @@ {a[i - 2], a[i - 1]}; Set[{a[i], c[k]}, {k, i}]; If[a[i] == u, While[c[u] > 0, u++]], {i, 4, nn}]; Array[a, nn] (* _Michael De Vlieger_, Apr 28 2022 *)
%Y A352867 Cf. A352768, A349493, A352790, A352774, A351001, A251622, A064413.
%K A352867 nonn,look
%O A352867 1,2
%A A352867 _Scott R. Shannon_, Apr 06 2022