login
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

%I #5 Jul 19 2022 08:10:25

%S 1,1,2,2,4,4,8,16,8,8,16,32,32,128,256,4096,16,16,32,64,64,256,512,

%T 8192,128,1024,2048,65536,4096,524288,1048576,4294967296,32,32,64,128,

%U 128,512,1024,16384,256,2048,4096,131072,8192,1048576,2097152,8589934592,512

%N 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.

%H <a href="/index/Bi#binary">Index entries for sequences related to binary expansion of n</a>

%F a(n) = n iff n is a power of 2.

%F a(2*n) = a(n) * 2^A048896(n-1) for any n > 0.

%e For n = 27:

%e - we have the following triangle:

%e 65536

%e 32 2048

%e 2 16 128

%e 1 2 8 16

%e - so a(27) = 65536.

%o (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) }

%Y See A355807 for similar sequences.

%Y Cf. A048896, A348296.

%K nonn,base

%O 0,3

%A _Rémy Sigrist_, Jul 18 2022