OFFSET
0,3
LINKS
FORMULA
a(2^k) = k+1 for any k >= 0.
Apparently a(2^k-1) = A038348(k) for any k >= 0.
EXAMPLE
For n = 6:
- the binary representation of 6 is "110",
- we can split it in 4 ways:
"110" -> 6
"1" and "10" -> 1 XOR 2 = 3
"11" and "0" -> 3 XOR 0 = 3
"1" and "1" and "0" -> 1 XOR 1 XOR 0 = 0
- we have 3 distinct values,
- hence a(6) = 3.
PROG
(PARI) See Links section.
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Rémy Sigrist, Jan 29 2020
STATUS
approved