|
|
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
|
|
|
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
|
|
|
KEYWORD
|
nonn,base,hard,more
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|