A054243 Number of partitions of n into distinct positive parts <= n, where parts are combined by XOR.
1, 1, 1, 2, 2, 4, 8, 16, 16, 32, 64, 128, 256, 512, 1024, 2048, 2048, 4096, 8192, 16384, 32768, 65536, 131072, 262144, 524288, 1048576, 2097152, 4194304, 8388608, 16777216, 33554432, 67108864, 67108864, 134217728, 268435456, 536870912
Offset: 0
Examples
a(5)=4 thus: 5 4+1 5+3+2+1 4+3+2 (where "+" = XOR).
Links
Programs
-
Mathematica
a[n_] := 2^(n - Ceiling[ Log[2, n] ] - 1); Table[a[n], {n, 1, 36}] (* Jean-François Alcover, Apr 04 2013 *)
-
PARI
a(n)=2^(n-1-log(n+.5)\log(2)) \\ Charles R Greathouse IV, Apr 08 2012
Comments