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 A327195 #13 Aug 26 2019 14:24:00 %S A327195 0,1,1,0,1,0,3,8,1,0,0,5,9,8,5,0,1,0,0,5,12,21,21,16,9,8,5,0,7,16,27, %T A327195 40,1,0,0,5,0,9,20,33,25,24,21,16,9,0,11,24,9,8,5,0,7,11,0,13,49,48, %U A327195 45,40,33,24,13,0,1,0,0,5,0,9,20,15,48,65,77,72,65 %N A327195 For any n >= 0: consider the different ways to split the binary representation of n into two (possibly empty) parts, say with value x and y; a(n) is the least possible value of abs(x^2 - y^2). %H A327195 Rémy Sigrist, <a href="/A327195/b327195.txt">Table of n, a(n) for n = 0..8192</a> %F A327195 a(n) = 0 iff n = 0 or n belongs to A175468. %F A327195 a(n) = 1 iff n is a power of 2. %e A327195 For n=42: %e A327195 - the binary representation of 42 is "101010", %e A327195 - there are 7 ways to split it: %e A327195 - "" and "101010": x=0 and y=42: abs(0^2 - 42^2) = 1764, %e A327195 - "1" and "01010": x=1 and y=10: abs(1^2 - 10^2) = 99, %e A327195 - "10" and "1010": x=2 and y=10: abs(2^2 - 10^2) = 96, %e A327195 - "101" and "010": x=5 and y=2: abs(5^2 - 2^2) = 21, %e A327195 - "1010" and "10": x=10 and y=2: abs(10^2 - 2^2) = 96, %e A327195 - "10101" and "0": x=21 and y=0: abs(21^2 - 0^2) = 441, %e A327195 - "101010" and "": x=42 and y=0: abs(42^2 - 0^2) = 1764, %e A327195 - hence a(42) = 21. %o A327195 (PARI) a(n) = my (v=oo, b=binary(n)); for (w=0, #b, v=min(v, abs(fromdigits(b[1..w],2)^2 - fromdigits(b[w+1..#b],2)^2))); v %Y A327195 See A327186 for other variants. %Y A327195 Cf. A175468. %K A327195 nonn,look,base %O A327195 0,7 %A A327195 _Rémy Sigrist_, Aug 25 2019