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 A357777 #16 Jun 29 2025 16:40:51 %S A357777 1,2,4,6,3,9,12,8,14,7,35,5,15,10,16,20,18,21,27,24,22,11,33,30,25,55, %T A357777 40,26,13,39,36,28,32,34,17,51,45,57,19,133,38,44,46,23,69,42,48,50, %U A357777 52,54,56,49,63,60,58,29,87,66,62,31,93,72,64,68,70,65,75,78 %N A357777 a(1)=1, a(2)=2. Thereafter a(n+1) is the smallest k such that gcd(k, a(n)) > 1, and gcd(k, s(n)) = 1, where s(n) is the n-th partial sum. %C A357777 Conjectured to be a permutation of the positive integers. %H A357777 Michael De Vlieger, <a href="/A357777/b357777.txt">Table of n, a(n) for n = 1..16384</a> %H A357777 Michael De Vlieger, <a href="/A357777/a357777.png">Log log scatterplot of a(n)</a>, n = 1..2^14, labeling records in red, local minima in blue, highlighting prime terms in green, prime partial sums in gold and labeling those in orange italics. %e A357777 a(3) = 4 because 4 is the smallest number which has not occurred already which is prime to s(2)=3 and shares a divisor (2) with a(2)=2. %t A357777 nn = 68; c[_] = False; Array[Set[{a[#], c[#]}, {#, True}] &, 2]; u = s = 3; Do[j = a[n - 1]; k = u; If[CoprimeQ[j, s], While[Nand[! c[k], CoprimeQ[k, s], ! CoprimeQ[j, k], k != s], k++]]; Set[{a[n], c[k]}, {k, True}]; s += k; If[k == u, While[c[u], u++]], {n, 3, nn}]; Array[a, nn] (* _Michael De Vlieger_, Oct 13 2022 *) %Y A357777 Cf. A064413, A357735. %K A357777 nonn %O A357777 1,2 %A A357777 _David James Sycamore_, Oct 12 2022