login
A386705
a(n) = sum of the 2^(n-1) even positive integers having bit length 2*n and in which, when written in binary, each run of 0's is of exactly the same length as the run of 1's immediately before it.
2
2, 22, 192, 1576, 12704, 101856, 815360, 6524032, 52194816, 417564160, 3340525568, 26724231168, 213793906688, 1710351376384, 13682811273216, 109462490742784, 875699927121920, 7005599419465728, 56044795360968704, 448358362898759680, 3586866903213146112, 28694935225753403392
OFFSET
1,1
COMMENTS
Row sums of A166751, when viewed as an irregular triangle whose row terms have the same number of bits (see the Example section there).
FORMULA
Empirical: a(n) = 12*a(n-1) - 36*a(n-2) + 32*a(n-3), with a(1) = 2, a(2) = 22, a(3) = 192.
EXAMPLE
For n = 3, the 2^(n-1) terms with bit length 2*n = 6 satisfying the criteria are (in binary): 101010, 101100, 110010 and 111000, corresponding (in decimal) to 42, 44, 50 and 56, giving a sum of 192.
MATHEMATICA
A386705[n_] := With[{b = Array[IntegerDigits[4^# - 2^#, 2] &, n]}, Total[Map[FromDigits[Flatten[#], 2] &, Map[b[[#]] &, Map[Permutations, IntegerPartitions[n]], {2}], {2}], 2]];
Array[A386705, 20]
CROSSREFS
Cf. A166751.
Sequence in context: A000184 A007613 A346796 * A279801 A043037 A058441
KEYWORD
nonn,base
AUTHOR
Paolo Xausa, Aug 28 2025
STATUS
approved