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 A386969 #16 Sep 03 2025 17:22:27 %S A386969 0,4,2,8,15,10,19,12,23,14,27,16,31,18,35,20,39,22,43,24,47,26,51,28, %T A386969 55,30,59,32,63,34,67,36,71,38,75,40,79,42,83,44,87,46,91,48,95,50,99, %U A386969 52,103,54,107,56,111,58,115,60,119,62,123,64,127,66,131,68,135,70,139,72,143,74,147,76,151 %N A386969 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 + 3. %C A386969 When visualized in connecting semicircular lines after a(n) = 8 it produces one increasingly large conical spiral. %t A386969 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 + 3]; a[0] = 0; Array[a, 100, 0] (* _Amiram Eldar_, Aug 22 2025 *) %Y A386969 Cf. A005132, A386947. %K A386969 nonn,new %O A386969 0,2 %A A386969 _Jules Beauchamp_, Aug 11 2025