This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A386705 #16 Sep 03 2025 00:48:46 %S A386705 2,22,192,1576,12704,101856,815360,6524032,52194816,417564160, %T A386705 3340525568,26724231168,213793906688,1710351376384,13682811273216, %U A386705 109462490742784,875699927121920,7005599419465728,56044795360968704,448358362898759680,3586866903213146112,28694935225753403392 %N 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. %C A386705 Row sums of A166751, when viewed as an irregular triangle whose row terms have the same number of bits (see the Example section there). %F A386705 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. %e A386705 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. %t A386705 A386705[n_] := With[{b = Array[IntegerDigits[4^# - 2^#, 2] &, n]}, Total[Map[FromDigits[Flatten[#], 2] &, Map[b[[#]] &, Map[Permutations, IntegerPartitions[n]], {2}], {2}], 2]]; %t A386705 Array[A386705, 20] %Y A386705 Cf. A166751. %K A386705 nonn,base,new %O A386705 1,1 %A A386705 _Paolo Xausa_, Aug 28 2025