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 A386947 #24 Sep 03 2025 17:26:46 %S A386947 0,3,1,6,2,9,17,10,20,11,23,12,26,13,29,14,32,15,35,16,38,61,39,64,40, %T A386947 67,41,70,42,73,43,76,44,79,45,82,46,85,47,8,50,93,51,96,52,7,55,104, %U A386947 56,107,57,110,58,5,61,118,62,121,63,4,66 %N A386947 A variant of Recamán's sequence (A005132): a(0) = 0; for n > 0, a(n) = a(n-1) - n if nonnegative and not already in the sequence, otherwise a(n) = a(n-1) + n + 2. %C A386947 When visualized in connecting semicircular lines (like the original Recamán Sequence, cf. Edmund Harriss, "The first 65 steps drawn as a spiral" in A005132), it appears to produce conical spirals. %C A386947 The first repeating term is 61. %H A386947 Jules Beauchamp, <a href="/A386947/a386947_1.png">The first 60 steps drawn as a spiral</a>. %t A386947 a[n_] := a[n] = If[a[n-1] >= n && FreeQ[Table[a[k], {k, 0, n-1}], a[n-1] - n], a[n-1] - n, a[n-1] + n + 2]; a[0] = 0; Array[a, 100, 0] (* _Amiram Eldar_, Aug 22 2025 *) %Y A386947 Cf. A005132, A386969. %K A386947 nonn,new %O A386947 0,2 %A A386947 _Jules Beauchamp_, Aug 10 2025