OFFSET
0,11
LINKS
Robert Israel, Table of n, a(n) for n = 0..99
EXAMPLE
a(12) = 2: +1^3 + 2^3 - 3^3 + 4^3 - 5^3 - 6^3 - 7^3 + 8^3 + 9^3 - 10^3 - 11^3 + 12^3 = -1^3 - 2^3 + 3^3 - 4^3 + 5^3 + 6^3 + 7^3 - 8^3 - 9^3 + 10^3 + 11^3 - 12^3 = 0.
MAPLE
f:= proc(n) local S, k, x, s;
S:= mul(1 + x^(2*k^3), k=1..n);
s:= sum(k^3, k=1..n);
coeff(S, x, s) + coeff(S, x, s+1)
end proc:
map(f, [$0..50]); # Robert Israel, Mar 15 2023
PROG
(Python)
from functools import lru_cache
@lru_cache(maxsize=None)
def b(n, i):
if n > (i*(i+1)//2)**2: return 0
if i == 0: return 1
return b(n+i**3, i-1) + b(abs(n-i**3), i-1)
def a(n): return b(0, n) + b(1, n)
print([a(n) for n in range(46)]) # Michael S. Branicky, Jan 19 2022
CROSSREFS
KEYWORD
nonn
AUTHOR
Ilya Gutkovskiy, Jan 19 2022
STATUS
approved