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 A331216 #12 Jan 14 2020 00:54:14 %S A331216 1,0,1,0,1,0,1,0,1,0,1,2,1,0,1,0,1,0,1,2,1,2,3,0,3,2,1,2,1,0,1,0,1,0, %T A331216 1,2,1,2,3,0,3,4,3,2,5,2,3,6,3,2,5,2,3,4,3,0,3,2,1,2,1,0,1,0,1,0,1,2, %U A331216 1,2,3,0,3,4,3,2,5,2,3,6,3,4,7,2,7,6,5 %N A331216 a(n) is the number of ways to write n = u + v where the binary representations of u and of v have the same number of 0's and the same number of 1's. %C A331216 In other words, a(n) is the number of ways to write n as the sum of two binary anagrams. %C A331216 Leading zeros are ignored. %H A331216 Rémy Sigrist, <a href="/A331216/b331216.txt">Table of n, a(n) for n = 0..16384</a> %H A331216 Rémy Sigrist, <a href="/A331216/a331216.gp.txt">PARI program for A331216</a> %H A331216 Rémy Sigrist, <a href="/A331216/a331216.png">Scatterplot of (x, y) such that 0 <= x, y <= 2^10 and x and y are binary anagrams</a> (a(n) corresponds to the number of pixels (x, y) such that x+y = n) %F A331216 a(2*n) > 0. %F A331216 a(2*n) >= a(n). %F A331216 Apparently, a(3*2^k-1-x) = a(3*2^k-1+x) for any k >= 0 and x = -2^k..2^k. %e A331216 For n = 22: %e A331216 - we can write 22 as u + v in the following ways: %e A331216 u v bin(u) bin(v) %e A331216 -- -- ------ ------ %e A331216 10 12 1010 1100 %e A331216 11 11 1011 1011 %e A331216 12 10 1100 1010 %e A331216 - hence a(22) = 3. %o A331216 (PARI) See Links section. %Y A331216 Cf. A330827 (ternary analog), A331218 (decimal analog). %K A331216 nonn,base %O A331216 0,12 %A A331216 _Rémy Sigrist_, Jan 12 2020