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 A331362 #14 Jan 15 2020 01:39:44 %S A331362 0,1,1,2,2,2,2,3,2,3,2,3,3,3,3,4,4,3,3,4,3,3,3,4,3,5,3,4,4,4,4,5,4,5, %T A331362 3,4,6,4,4,5,3,4,3,4,4,4,4,5,5,7,5,6,4,4,4,5,4,6,4,5,5,5,5,6,8,5,5,6, %U A331362 4,4,4,5,6,7,4,5,5,5,5,6,5,9,4,5,4,4,4 %N A331362 a(n) is the greatest value of the form s_1 + ... + s_k such that the concatenation of the binary representations of s_1^2, ..., s_k^2 equals the binary representation of n. %C A331362 As 0 and 1 are squares, we can always split the binary representation of a number into squares, and the sequence is well defined. %H A331362 Rémy Sigrist, <a href="/A331362/b331362.txt">Table of n, a(n) for n = 0..16384</a> %H A331362 Rémy Sigrist, <a href="/A331362/a331362.png">Density plot of the first 2^20 terms</a> %H A331362 Rémy Sigrist, <a href="/A331362/a331362.gp.txt">PARI program for A331362</a> %H A331362 <a href="/index/Bi#binary">Index entries for sequences related to binary expansion of n</a> %F A331362 a(n) >= A000120(n) with equality iff n belongs to A003754. %F A331362 a(n^2) = n. %e A331362 For n = 8: %e A331362 - the binary representation of 8 is "1000", %e A331362 - we can split it into "100" and "0" (2^2 and 0^2), %e A331362 - or into "1" and "0" and "0" and "0" (1^2 and 0^2 and 0^2 and 0^2), %e A331362 - so a(8) = max(2+0, 1+0+0+0) = 2. %o A331362 (PARI) See Links section. %Y A331362 Cf. A000120, A003754. %K A331362 nonn,base %O A331362 0,4 %A A331362 _Rémy Sigrist_, Jan 14 2020