login
Partial sums of A059268.
1

%I #16 Jun 20 2017 23:14:21

%S 1,2,4,5,7,11,12,14,18,26,27,29,33,41,57,58,60,64,72,88,120,121,123,

%T 127,135,151,183,247,248,250,254,262,278,310,374,502,503,505,509,517,

%U 533,565,629,757,1013,1014,1016,1020,1028,1044,1076,1140,1268,1524,2036

%N Partial sums of A059268.

%F a(n) = 2^t + 2^(n-t*(t-1)/2) - t - 2, where t = floor(sqrt(2*n) + 1/2), n>=1.

%e For n=10, a(10) = 1 + 1 + 2 + 1 + 2 + 4 + 1 + 2 + 4 + 8 = 26.

%t Accumulate@ Flatten@ Array[2^Range[0, #] &, 10, 0] (* _Michael De Vlieger_, Jun 11 2017 *)

%o (PARI) for(n=1, 100, t=floor(sqrt(2*n)+1/2); print1(2^t+2^(n-t*(t-1)/2)-t-2, ", "));

%Y Cf. A059268.

%K nonn

%O 1,2

%A _Zhining Yang_, Jun 08 2017