login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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. 4
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, 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, 4, 4, 4, 5, 6, 7, 4, 5, 5, 5, 5, 6, 5, 9, 4, 5, 4, 4, 4 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,4
COMMENTS
As 0 and 1 are squares, we can always split the binary representation of a number into squares, and the sequence is well defined.
LINKS
FORMULA
a(n) >= A000120(n) with equality iff n belongs to A003754.
a(n^2) = n.
EXAMPLE
For n = 8:
- the binary representation of 8 is "1000",
- we can split it into "100" and "0" (2^2 and 0^2),
- or into "1" and "0" and "0" and "0" (1^2 and 0^2 and 0^2 and 0^2),
- so a(8) = max(2+0, 1+0+0+0) = 2.
PROG
(PARI) See Links section.
CROSSREFS
Sequence in context: A260235 A078120 A057525 * A139325 A341829 A344888
KEYWORD
nonn,base
AUTHOR
Rémy Sigrist, Jan 14 2020
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 23 02:53 EDT 2024. Contains 371906 sequences. (Running on oeis4.)