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 A360931 #13 Jun 21 2025 00:45:19 %S A360931 2,3,5,8,13,7,20,6,4,10,12,14,11,9,31,16,47,15,62,17,19,36,55,21,26, %T A360931 23,25,48,18,22,24,28,30,32,27,29,35,64,34,38,40,42,37,33,70,43,39,82, %U A360931 46,44,50,52,54,41,45,86,51,49,58,65,53,63,116,56,60,66,57,59,68,127,61,188,249,67,73,140 %N A360931 a(1) = 2, a(2) = 3; for n > 2, a(n) is the smallest number greater than 1 that has not appeared such that |a(n) - a(n-1)| has a common factor with a(n-2). %C A360931 In the first 100000 terms the fixed points are 10, 16, 42, 52, 66; it is likely no more exist. The sequence is conjectured to be a permutation of the positive integers > 1. %H A360931 Scott R. Shannon, <a href="/A360931/a360931.png">Image for n = 1..100000</a>. The green line is a(n) = n. %e A360931 a(6) = 7 as |7 - a(5)| = |7 - 13| = 6 which shares a common factor with a(4) = 8. %t A360931 nn = 120; c[_] = False; Array[Set[{a[#], c[# + 1]}, {# + 1, True}] &, 2]; i = 2; j = 3; u = 4; Do[k = u; While[Or[c[k], CoprimeQ[i, #]] &[Abs[k - j]], k++]; Set[{a[n], c[k], i, j}, {k, True, j, k}]; If[k == u, While[c[u], u++]], {n, 3, nn}]; Array[a, nn] (* _Michael De Vlieger_, Feb 26 2023 *) %Y A360931 Cf. A098550, A336957, A337136, A359557, A353239. %K A360931 nonn %O A360931 1,1 %A A360931 _Scott R. Shannon_, Feb 25 2023