cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A350861 Number of solutions to +-1^3 +- 2^3 +- 3^3 +- ... +- n^3 = 0 or 1.

This page as a plain text file.
%I A350861 #13 Mar 15 2023 12:39:17
%S A350861 1,1,0,0,0,0,0,0,0,0,2,0,2,4,1,4,2,6,1,4,124,12,344,536,712,1140,713,
%T A350861 4574,2260,4384,5956,10634,73758,48774,197767,406032,638830,1147500,
%U A350861 1097442,4249160,3263500,6499466,11844316,21907736,82561050,85185855,261696060
%N A350861 Number of solutions to +-1^3 +- 2^3 +- 3^3 +- ... +- n^3 = 0 or 1.
%H A350861 Robert Israel, <a href="/A350861/b350861.txt">Table of n, a(n) for n = 0..99</a>
%e A350861 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.
%p A350861 f:= proc(n) local S,k,x,s;
%p A350861   S:= mul(1 + x^(2*k^3),k=1..n);
%p A350861   s:= sum(k^3,k=1..n);
%p A350861   coeff(S,x,s) + coeff(S,x,s+1)
%p A350861 end proc:
%p A350861 map(f, [$0..50]); # _Robert Israel_, Mar 15 2023
%o A350861 (Python)
%o A350861 from functools import lru_cache
%o A350861 @lru_cache(maxsize=None)
%o A350861 def b(n, i):
%o A350861     if n > (i*(i+1)//2)**2: return 0
%o A350861     if i == 0: return 1
%o A350861     return b(n+i**3, i-1) + b(abs(n-i**3), i-1)
%o A350861 def a(n): return b(0, n) + b(1, n)
%o A350861 print([a(n) for n in range(46)]) # _Michael S. Branicky_, Jan 19 2022
%Y A350861 Cf. A000578, A025591, A113263, A158118.
%K A350861 nonn
%O A350861 0,11
%A A350861 _Ilya Gutkovskiy_, Jan 19 2022