login
A355811
a(n) is the number at the apex of a triangle whose base contains the distinct powers of 2 summing to n (in ascending order), and each number in a higher row is the product of the two numbers directly below it; a(0) = 1.
1
1, 1, 2, 2, 4, 4, 8, 16, 8, 8, 16, 32, 32, 128, 256, 4096, 16, 16, 32, 64, 64, 256, 512, 8192, 128, 1024, 2048, 65536, 4096, 524288, 1048576, 4294967296, 32, 32, 64, 128, 128, 512, 1024, 16384, 256, 2048, 4096, 131072, 8192, 1048576, 2097152, 8589934592, 512
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
See A355807 for similar sequences.
Sequence in context: A276063 A247181 A118406 * A357214 A072488 A285437
KEYWORD
nonn,base
AUTHOR
Rémy Sigrist, Jul 18 2022
STATUS
approved