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 A317018 #26 Feb 06 2024 19:31:33 %S A317018 0,1,-1,-2,2,3,5,-3,-4,4,20,12,8,6,7,9,-7,-8,-10,-6,-5,-9,-41,23,22, %T A317018 24,25,29,27,26,28,36,-28,-12,-11,-13,-14,-18,14,15,17,-15,-16,16,80, %U A317018 48,32,30,31,33,-31,-27,-29,-30,-34,-32,-40,-24,-20,-19,13,11,10 %N A317018 Sequence of distinct signed integers such that a(1) = 0 and for any n > 0, the negabinary representation of a(n+1) differ by exactly one digit from the negabinary representation of a(n) and has the smallest possible absolute value (in case of a tie, choose the integer with the rightmost difference). %C A317018 This sequence has similarities with A316995; in both sequences, the absolute value of the difference of two consecutive terms is a power of 2. %C A317018 This sequence also has similarities with A163252. %H A317018 Rémy Sigrist, <a href="/A317018/b317018.txt">Table of n, a(n) for n = 1..10000</a> %H A317018 Rémy Sigrist, <a href="/A317018/a317018.png">Line plot of the first 10000 terms</a> %H A317018 Rémy Sigrist, <a href="/A317018/a317018.gp.txt">PARI program for A317018</a> %H A317018 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/Negabinary.html">Negabinary</a>. %H A317018 Wikipedia, <a href="https://en.wikipedia.org/wiki/Negative_base">Negative base</a>. %e A317018 The first terms, alongside their negabinary representation, are: %e A317018 n a(n) nega(a(n)) %e A317018 -- ---- ---------- %e A317018 1 0 0 %e A317018 2 1 1 %e A317018 3 -1 11 %e A317018 4 -2 10 %e A317018 5 2 110 %e A317018 6 3 111 %e A317018 7 5 101 %e A317018 8 -3 1101 %e A317018 9 -4 1100 %e A317018 10 4 100 %e A317018 11 20 10100 %e A317018 12 12 11100 %e A317018 13 8 11000 %e A317018 14 6 11010 %e A317018 15 7 11011 %e A317018 16 9 11001 %e A317018 17 -7 1001 %e A317018 18 -8 1000 %e A317018 19 -10 1010 %e A317018 20 -6 1110 %o A317018 (PARI) See Links section. %Y A317018 Cf. A039724, A163252, A212529, A316995. %K A317018 sign,base %O A317018 1,4 %A A317018 _Rémy Sigrist_, Jul 19 2018