OFFSET
1,2
FORMULA
a(n) = A309082(n^3).
MATHEMATICA
a[n_] := Sum[(-1)^(k + 1)*Floor[(n/k)^3], {k, 1, n}]; Array[a, 50] (* Amiram Eldar, Dec 20 2021 *)
PROG
(PARI) a(n) = sum(k=1, n, (-1)^(k+1)*(n^3\k^3));
(Python)
def A350222(n): return (m:=n**3)+sum(m//k**3 if k&1 else -(m//k**3) for k in range(2, n+1)) # Chai Wah Wu, Oct 27 2023
CROSSREFS
KEYWORD
nonn
AUTHOR
Seiichi Manyama, Dec 20 2021
STATUS
approved