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 A380123 #10 Jan 14 2025 09:06:43 %S A380123 0,0,1,0,2,-1,0,3,4,0,4,0,1,4,5,-2,0,6,8,-1,0,7,8,0,8,0,1,8,9,0,2,8, %T A380123 10,-5,-4,-1,0,11,12,15,16,-4,0,12,16,-4,-3,0,1,12,13,16,17,-2,0,14, %U A380123 16,-1,0,15,16,0,16,0,1,16,17,0,2,16,18,-1,0,3,4,15,16,19,20 %N A380123 Irregular table T(n, k), n >= 0, k = 1..A380122(n), read by rows; the n-th row lists the integers m (possibly negative) such that the nonzero digits in the nonadjacent form for m appear in the nonadjacent form for n. %H A380123 Rémy Sigrist, <a href="/A380123/b380123.txt">Table of n, a(n) for n = 0..6724</a> (rows for n = 0..2^9 flattened) %H A380123 Joerg Arndt, <a href="http://www.jjj.de/fxt/#fxtbook">Matters Computational (The Fxtbook)</a>, pages 61-62. %H A380123 Wikipedia, <a href="https://en.wikipedia.org/wiki/Non-adjacent_form">Non-adjacent form</a> %F A380123 T(n, 1) = A184616(n). %F A380123 T(n, A380122(n)) = n. %e A380123 Irregular table T(n, k) begins: %e A380123 n n-th row %e A380123 -- ----------------------------- %e A380123 0 0 %e A380123 1 0, 1 %e A380123 2 0, 2 %e A380123 3 -1, 0, 3, 4 %e A380123 4 0, 4 %e A380123 5 0, 1, 4, 5 %e A380123 6 -2, 0, 6, 8 %e A380123 7 -1, 0, 7, 8 %e A380123 8 0, 8 %e A380123 9 0, 1, 8, 9 %e A380123 10 0, 2, 8, 10 %e A380123 11 -5, -4, -1, 0, 11, 12, 15, 16 %e A380123 12 -4, 0, 12, 16 %e A380123 13 -4, -3, 0, 1, 12, 13, 16, 17 %e A380123 14 -2, 0, 14, 16 %e A380123 15 -1, 0, 15, 16 %e A380123 16 0, 16 %e A380123 . %e A380123 Irregular table T(n, k) begins in nonadjacent form: %e A380123 n n-th row %e A380123 ----- ------------------------------------------ %e A380123 0 0 %e A380123 1 0, 1 %e A380123 10 0, 10 %e A380123 10T T, 0, 10T, 100 %e A380123 100 0, 100 %e A380123 101 0, 1, 100, 101 %e A380123 10T0 T0, 0, 10T0, 1000 %e A380123 100T T, 0, 100T, 1000 %e A380123 1000 0, 1000 %e A380123 1001 0, 1, 1000, 1001 %e A380123 1010 0, 10, 1000, 1010 %e A380123 10T0T T0T, T00, T, 0, 10T0T, 10T00, 1000T, 10000 %e A380123 10T00 T00, 0, 10T00, 10000 %o A380123 (PARI) row(n) = { my (r = [0], d, b = 1); while (n, if (n % 2, n -= d = 2 - (n%4); r = concat(r, [v + d*b | v <- r]);); n /= 2; b *= 2;); vecsort(r); } %Y A380123 See A295989 for a similar sequence. %Y A380123 Cf. A184616, A380122. %K A380123 sign,base,tabf %O A380123 0,5 %A A380123 _Rémy Sigrist_, Jan 12 2025