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.

A378171 Number of subsets of the first n positive cubes whose sum is a positive cube.

This page as a plain text file.
%I A378171 #8 Nov 19 2024 00:53:12
%S A378171 1,2,3,4,6,7,8,11,12,18,23,32,42,67,99,150,247,391,635,1098,1865,2927,
%T A378171 4932,9109,14825,26926,48452,83758,148387,263258,468595,840912,
%U A378171 1559322,2785642,5146754,9454946,16756330,31372080,57754175,105385375,196773661,368705288,671572482
%N A378171 Number of subsets of the first n positive cubes whose sum is a positive cube.
%H A378171 Michael S. Branicky, <a href="/A378171/b378171.txt">Table of n, a(n) for n = 1..74</a>
%e A378171 a(8) = 11 subsets: {1}, {8}, {27}, {64}, {125}, {216}, {343}, {512}, {1, 216, 512}, {27, 64, 125} and {1, 27, 64, 125, 512}.
%o A378171 (Python)
%o A378171 from sympy import integer_nthroot
%o A378171 def is_cube(n): return integer_nthroot(n, 3)[1]
%o A378171 from functools import cache
%o A378171 @cache
%o A378171 def b(n, soc):
%o A378171     if n == 0:
%o A378171         if soc > 0 and is_cube(soc): return 1
%o A378171         return 0
%o A378171     return b(n-1, soc) + b(n-1, soc+n**3)
%o A378171 a = lambda n: b(n, 0)
%o A378171 print([a(n) for n in range(1, 30)]) # _Michael S. Branicky_, Nov 18 2024
%Y A378171 Cf. A000578, A126111, A336815, A339615, A378170.
%K A378171 nonn
%O A378171 1,2
%A A378171 _Ilya Gutkovskiy_, Nov 18 2024
%E A378171 a(25) and beyond from _Michael S. Branicky_, Nov 18 2024