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!)
A357742 a(n) is the maximum binary weight of the squares of n-bit numbers. 1
1, 2, 3, 5, 6, 8, 9, 13, 13, 15, 16, 18, 20, 22, 24, 25, 27, 29, 31, 34, 34, 37, 38, 39, 41, 44, 44, 47, 49, 51, 52, 54, 55, 57, 59, 63, 63, 64, 66, 68, 69, 72, 73, 76, 77, 78, 80, 82, 85, 87 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
LINKS
FORMULA
a(n) = max(A357658(2*n-2), A357658(2*n-1)).
EXAMPLE
bit |
length | possible binary weight of k^2
of k | 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
= n | the rightmost value is a(n)
-------+--------------------------------------------------------------
1 | 0 1
2 | 1 2 - -
3 | 1 2 3 - - -
4 | 1 2 3 4 5 - - -
5 | 1 2 3 4 5 6 - - - -
6 | 1 2 3 4 5 6 7 8 - - - -
7 | 1 2 3 4 5 6 7 8 9 - - - - -
8 | 1 2 3 4 5 6 7 8 9 10 11 - 13 - - -
9 | 1 2 3 4 5 6 7 8 9 10 11 12 13 - - - - -
10 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 - - - - -
PROG
(Python 3.10+)
def A357742(n): return max((k**2).bit_count() for k in range(1<<n-1, 1<<n)) # Chai Wah Wu, Oct 17 2022
CROSSREFS
Sequence in context: A030709 A226806 A058588 * A035399 A354852 A153775
KEYWORD
nonn,base,hard,more
AUTHOR
EXTENSIONS
a(47)-a(50) from Martin Ehrenstein, Dec 26 2023
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 24 20:08 EDT 2024. Contains 371963 sequences. (Running on oeis4.)