Find six distinct positive integers A, B, C, D, E, F, G satisfying:
A3 + B3 = C3 + D3 = E3 + F3 = 19G3.
Please submit primitive solutions only, that is, A, B, C, D, E, F, G should not have a common factor.
A B C D E F G
70 560 198 552 315 525 210
Program output:
{210: [[70, 560], [198, 552], [315, 525]]}
If the variable "big" is increased by a factor of 10, there are 16 more solutions, but they are multiples of the above solution by a factor of 2,3,4, ... etc.
-----------
big = 1000
cubes = [a**3 for a in range(1,big+1)]
lessbig = 1 + int((2*cubes[-1]/19)**(1/3))
if big < 7:
lessbig += 1
targets = [19 * a**3 for a in range(1,lessbig)]
targetDict = {}
from itertools import combinations
for c in combinations(cubes,2):
if c[0] + c[1] not in targets:
continue
g = round(((c[0] + c[1]) / 19)**(1/3))
if g not in targetDict:
targetDict[g] = [[min(c),max(c)]]
else:
if [min(c),max(c)] in targetDict[g]:
continue
targetDict[g].append([min(c),max(c)])
atleast3 = {}
for key,val in targetDict.items():
if len(targetDict[key]) < 3:
continue
atleast3[key] = val
roots = {}
for k,v in atleast3.items():
roots[k] = []
for pair in v:
cbrts = [round(pair[0]**(1/3)) , round(pair[1]**(1/3))]
roots[k].append(cbrts)
print(roots)
|
Posted by Larry
on 2024-04-18 09:38:23 |