OFFSET
1,2
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
Karl-Heinz Hofmann and Hugo Pfoertner , Oct 11 2022
EXTENSIONS
a(47)-a(50) from Martin Ehrenstein, Dec 26 2023
STATUS
approved