login
a(n) = Sum_{k=0..n} floor(sqrt(k))^3.
4

%I #45 Jun 15 2023 07:44:10

%S 0,1,2,3,11,19,27,35,43,70,97,124,151,178,205,232,296,360,424,488,552,

%T 616,680,744,808,933,1058,1183,1308,1433,1558,1683,1808,1933,2058,

%U 2183,2399,2615,2831,3047,3263,3479,3695,3911,4127,4343,4559,4775,4991,5334

%N a(n) = Sum_{k=0..n} floor(sqrt(k))^3.

%C Partial sums of the third powers of the terms of A000196.

%H Karl-Heinz Hofmann, <a href="/A363497/b363497.txt">Table of n, a(n) for n = 0..10000</a>

%F a(n) = (n+1)*m^3 - (1/60)*m*(m+1)*(3*m-1)*(12*m^2+7*m-4), where m = floor(sqrt(n)).

%t Table[(n + 1) #^3 - (1/60) # (# + 1) (3 # - 1) (12 #^2 + 7 # - 4) &[Floor@ Sqrt[n]], {n, 0, 50}] (* _Michael De Vlieger_, Jun 10 2023 *)

%o (PARI) a(n) = sum(k=0, n, sqrtint(k)^3); \\ _Michel Marcus_, Jun 06 2023

%o (Python)

%o from math import isqrt

%o A363497 = [0]

%o for n in range(1,50): A363497.append(A363497[-1] + isqrt(n)**3)

%o print(A363497) # _Karl-Heinz Hofmann_, Jun 14 2023

%o (Python)

%o from math import isqrt

%o def A363497(n):return (m:=isqrt(n))**3*(n+1)-(m*(m+1)*(3*m-1)*(12*m**2+7*m-4))//60

%o # _Karl-Heinz Hofmann_, Jun 14 2023

%Y Sums of powers of A000196: A022554 (1st), A174060 (2nd), this sequence (3rd), A363498 (4th), A363499 (5th).

%K nonn,easy

%O 0,3

%A _Hans J. H. Tuenter_, Jun 05 2023