login
For n >= 2, a(n) = Sum_{k=2..n} prevpower2(k) + nextpower2(k) - 2*k, where prevpower2(k) is the largest power of 2 < k, nextpower2(k) is the smallest power of 2 > k.
0

%I #16 Apr 28 2020 00:14:22

%S 1,1,3,5,5,3,7,13,17,19,19,17,13,7,15,29,41,51,59,65,69,71,71,69,65,

%T 59,51,41,29,15,31,61,89,115,139,161,181,199,215,229,241,251,259,265,

%U 269,271,271,269,265,259,251,241,229,215,199,181,161

%N For n >= 2, a(n) = Sum_{k=2..n} prevpower2(k) + nextpower2(k) - 2*k, where prevpower2(k) is the largest power of 2 < k, nextpower2(k) is the smallest power of 2 > k.

%C Partial sums of b(k) = prevpower2(k) + nextpower2(k) - 2*k; b(k) = 0 for A007283.

%e a(2) = (1 + 4 - 2*2) = 1;

%e a(3) = (1 + 4 - 2*2) + (2 + 4 - 2*3) = 1;

%e a(4) = (1 + 4 - 2*2) + (2 + 4 - 2*3) + (2 + 8 - 2*4) = 3.

%Y Cf. A000079, A007283, A062050, A080079.

%K nonn

%O 2,3

%A _Ctibor O. Zizka_, Apr 09 2020