OFFSET
1,1
COMMENTS
This sequence is based on a generalization of Fermat's last theorem with n=3, in which three terms are added. Fermat's Theorem states that there are no solution with only two terms, this sequence shows there are many integers for which there are multiple solutions if three terms are allowed. The sequence is also related to the Taxicab numbers.
EXAMPLE
41 is in the sequence because 41^3 = 33^3 + 32^3 + 6^3 = 40^3 + 17^3 + 2^3.
MATHEMATICA
q[k_] := Count[IntegerPartitions[k^3, {3}, Range[0, k-1]^3], _?(UnsameQ @@ # &)] > 1; Select[Range[200], q] (* Amiram Eldar, Sep 03 2021 *)
PROG
(Python)
from itertools import combinations
from collections import Counter
from sympy import integer_nthroot
def icuberoot(n): return integer_nthroot(n, 3)[0]
def aupto(kmax):
cubes = [i**3 for i in range(kmax+1)]
cands, cubesset = (sum(c) for c in combinations(cubes, 3)), set(cubes)
c = Counter(s for s in cands if s in cubesset)
return sorted(icuberoot(s) for s in c if c[s] >= 2)
print(aupto(203)) # Michael S. Branicky, Sep 04 2021
CROSSREFS
KEYWORD
nonn
AUTHOR
Sebastian Magee, Jul 30 2021
STATUS
approved