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.

Original entry on oeis.org

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, 4574, 2260, 4384, 5956, 10634, 73758, 48774, 197767, 406032, 638830, 1147500, 1097442, 4249160, 3263500, 6499466, 11844316, 21907736, 82561050, 85185855, 261696060
Offset: 0

Views

Author

Ilya Gutkovskiy, Jan 19 2022

Keywords

Examples

			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.
		

Crossrefs

Programs

  • 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
  • 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