OFFSET
0,3
COMMENTS
Partial sums of the third powers of the terms of A000196.
LINKS
Karl-Heinz Hofmann, Table of n, a(n) for n = 0..10000
FORMULA
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)).
MATHEMATICA
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 *)
PROG
(PARI) a(n) = sum(k=0, n, sqrtint(k)^3); \\ Michel Marcus, Jun 06 2023
(Python)
from math import isqrt
A363497 = [0]
print(A363497) # Karl-Heinz Hofmann, Jun 14 2023
(Python)
from math import isqrt
def A363497(n):return (m:=isqrt(n))**3*(n+1)-(m*(m+1)*(3*m-1)*(12*m**2+7*m-4))//60
# Karl-Heinz Hofmann, Jun 14 2023
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Hans J. H. Tuenter, Jun 05 2023
STATUS
approved