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 A327194 #15 Mar 03 2023 11:44:27 %S A327194 0,1,1,2,1,2,5,10,1,2,5,10,9,10,13,18,1,2,5,10,17,26,29,34,9,10,13,18, %T A327194 25,34,45,58,1,2,5,10,17,26,37,50,25,26,29,34,41,50,61,74,9,10,13,18, %U A327194 25,34,45,58,49,50,53,58,65,74,85,98,1,2,5,10,17,26,37 %N A327194 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 x^2 + y^2. %C A327194 This sequence shares graphical features with A286327. %H A327194 Rémy Sigrist, <a href="/A327194/b327194.txt">Table of n, a(n) for n = 0..8192</a> %F A327194 a(n) = 1 iff n is a power of 2. %e A327194 For n=42: %e A327194 - the binary representation of 42 is "101010", %e A327194 - there are 7 ways to split it: %e A327194 - "" and "101010": x=0 and y=42: 0^2 + 42^2 = 1764, %e A327194 - "1" and "01010": x=1 and y=10: 1^2 + 10^2 = 101, %e A327194 - "10" and "1010": x=2 and y=10: 2^2 + 10^2 = 104, %e A327194 - "101" and "010": x=5 and y=2: 5^2 + 2^2 = 29, %e A327194 - "1010" and "10": x=10 and y=2: 10^2 + 2^2 = 104, %e A327194 - "10101" and "0": x=21 and y=0: 21^2 + 0^2 = 441, %e A327194 - "101010" and "": x=42 and y=0: 42^2 + 0^2 = 1764, %e A327194 - hence a(42) = 29. %t A327194 Table[Min[Total[#^2]&/@Table[FromDigits[#,2]&/@TakeDrop[IntegerDigits[n,2],d],{d,0,IntegerLength[n,2]}]],{n,0,80}] (* _Harvey P. Dale_, Mar 03 2023 *) %o A327194 (PARI) a(n) = my (v=oo, b=binary(n)); for (w=0, #b, v=min(v, fromdigits(b[1..w],2)^2 + fromdigits(b[w+1..#b],2)^2)); v %Y A327194 See A327186 for other variants. %Y A327194 Cf. A286327. %K A327194 nonn,look,base %O A327194 0,4 %A A327194 _Rémy Sigrist_, Aug 25 2019