%I #11 May 29 2021 18:05:10
%S 1,4,5,16,20,21,64,80,84,85,256,320,336,340,341,1024,1280,1344,1360,
%T 1364,1365,4096,5120,5376,5440,5456,5460,5461,16384,20480,21504,21760,
%U 21824,21840,21844,21845,65536,81920,86016,87040,87296,87360,87376,87380
%N Numbers that are sums of consecutive powers of 4.
%C Numbers of the form (4^i - 4^j)/3 with i > j.
%H Harvey P. Dale, <a href="/A309759/b309759.txt">Table of n, a(n) for n = 1..1000</a>
%e 336 = 4^2 + 4^3 + 4^4, so 336 is in the sequence.
%e +------+--------+
%e | a(n) | base 4*|
%e +------+--------+
%e | 1 | 1 |
%e | 4 | 10 |
%e | 5 | 11 |
%e | 16 | 100 |
%e | 20 | 110 |
%e | 21 | 111 |
%e | 64 | 1000 |
%e | 80 | 1100 |
%e | 84 | 1110 |
%e | 85 | 1111 |
%e +------+--------+
%e * - a(n) written in base 4.
%t Module[{nn=10,k},k=4^Range[0,nn];Table[Accumulate[Reverse[Take[k,n]]],{n,nn}]]//Flatten (* _Harvey P. Dale_, May 29 2021 *)
%Y Cf. A000302, A000695, A023758, A038470, A309758, A309761.
%K nonn
%O 1,2
%A _Ilya Gutkovskiy_, Aug 15 2019