login
a(n) = Sum_{k=0..n} (-1)^k*floor(k^(1/3)).
2

%I #14 Mar 20 2016 12:40:19

%S 0,-1,0,-1,0,-1,0,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,

%T -2,1,-2,1,-2,1,-2,1,-2,1,-2,1,-2,1,-2,1,-2,1,-2,1,-2,1,-2,1,-2,1,-2,

%U 1,-2,1,-2,1,-2,1,-2,1,-2,2,-2,2,-2,2,-2

%N a(n) = Sum_{k=0..n} (-1)^k*floor(k^(1/3)).

%F a(n) = floor(n^(1/3))*(-1)^n/2 - ((-1)^(floor(n^(1/3))+1)+1)/4.

%e a(5) = [0^(1/3)]-[1^(1/3)]+[2^(1/3)]-[3^(1/3)]+[4^(1/3)]-[5^(1/3)] = 0-1+1-1+1-1 = -1, letting [] denote the floor function.

%t Print[Table[Sum[(-1)^i*Floor[i^(1/3)],{i,0,n}],{n,0,100}]]

%o (PARI) a(n)=sum(i=0,n,(-1)^i*sqrtnint(i,3))

%o (PARI) a(n)=sqrtnint(n,3)*(-1)^n/2-((-1)^(sqrtnint(n,3)+1)+1)/4

%Y Cf. A268173, A022554, A031876, A032512, A032513, A032514, A032515, A032516, A032517, A032518, A032519, A032520, A032521.

%K sign,easy

%O 0,28

%A _John M. Campbell_, Mar 15 2016