OFFSET
0,3
FORMULA
a(n) = n iff n is a power of 2.
a(2*n) = a(n) * 2^A048896(n-1) for any n > 0.
EXAMPLE
For n = 27:
- we have the following triangle:
65536
32 2048
2 16 128
1 2 8 16
- so a(27) = 65536.
PROG
(PARI) a(n) = { my (b=vector(hammingweight(n))); for (k=1, #b, n-=b[k]=2^valuation(n, 2)); while (#b>1, b=vector(#b-1, k, b[k+1]*b[k])); if (#b, b[1], 1) }
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Rémy Sigrist, Jul 18 2022
STATUS
approved