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 A380122 #8 Jan 14 2025 09:06:38 %S A380122 1,2,2,4,2,4,4,4,2,4,4,8,4,8,4,4,2,4,4,8,4,8,8,8,4,8,8,8,4,8,4,4,2,4, %T A380122 4,8,4,8,8,8,4,8,8,16,8,16,8,8,4,8,8,16,8,16,8,8,4,8,8,8,4,8,4,4,2,4, %U A380122 4,8,4,8,8,8,4,8,8,16,8,16,8,8,4,8,8,16,8 %N A380122 a(n) is the number of integers m (possibly negative) such that the nonzero digits in the nonadjacent form for m appear in the nonadjacent form for n. %H A380122 Rémy Sigrist, <a href="/A380122/b380122.txt">Table of n, a(n) for n = 0..8192</a> %H A380122 Joerg Arndt, <a href="http://www.jjj.de/fxt/#fxtbook">Matters Computational (The Fxtbook)</a>, pages 61-62. %H A380122 Wikipedia, <a href="https://en.wikipedia.org/wiki/Non-adjacent_form">Non-adjacent form</a> %F A380122 a(n) = 2^A000120(A184617(n)) = A001316(A184617(n)). %e A380122 The nonadjacent form for 25 is "10T001" and has 3 nonzero digits, so a(25) = 2^3 = 8. %o A380122 (PARI) a(n) = { my (v = 1); while (n, if (n%2, n -= 2 - (n%4); v *= 2; ); n \= 2; ); return (v); } %Y A380122 Cf. A000120, A001316, A184617, A380123 (corresponding m's). %K A380122 nonn,base %O A380122 0,2 %A A380122 _Rémy Sigrist_, Jan 12 2025