Heiro: Good morning, Archimedes! I bet you 1000 drachma that you can’t answer a simple maths problem!
Archimedes: You’re on.
Heiro: Did you know that every sum of consecutive cubes is also a difference of squares?
Archimedes: Indeed, as everyone knows, each and every sum of consecutive cubes is also a difference of consecutive squares. Was that the question?
Heiro: Not so fast, Archimedes! What if the sum and difference are a prime number?
Archimedes (yawning): Unlikely, since any sum of cubes has at least two factors…
Heiro: Let’s make it a difference of consecutive cubes, then?
Archimedes: There is no reason why such a difference should not be prime, as often as occasion demands. For example, 2^3-1^3 = 7. Have I won yet?
Heiro: I'm just working up to it. What about a difference of consecutive cubes, which is not only prime, but is also a sum of consecutive squares?
Archimedes: Too easy! 61 = 5^3-4^3=5^2+6^2. Can I have my money now?
Heiro: Very well, then, here's my question – just to make it interesting, let’s also stipulate that a side of the larger cube must have at least 4 distinct prime factors – so it must be at least 2*3*5*7 = 210, say? Just how big would that cube have to be?
Archimedes: Easy again! – or is it? Wait a minute…
What is the answer to Heiro’s simple problem?
Programmed to find solutions with 3 or more factors in the larger cube:
10 for Strt=1 to 1000000
30 if prmdiv(Diff)=Diff or prmdiv(Diff)=0 then
50 :if St2^2+(St2+1)^2=Diff then
60 :if fnFactor(Strt+1)>2 then
80 :print Strt;Strt+1,St2;St2+1,Diff
1020 if N>0 then Limit=sqrt(N):else Limit=0
1030 if Limit<>int(Limit) then Limit=int(Limit+1)
1040 Dv=2:gosub *DivideIt
1050 Dv=3:gosub *DivideIt
1060 Dv=5:gosub *DivideIt
1090 if Dv>Limit then goto *Afterloop
1100 gosub *DivideIt:Dv=Dv+4 '11
1110 gosub *DivideIt:Dv=Dv+2 '13
1120 gosub *DivideIt:Dv=Dv+4 '17
1130 gosub *DivideIt:Dv=Dv+2 '19
1140 gosub *DivideIt:Dv=Dv+4 '23
1150 gosub *DivideIt:Dv=Dv+6 '29
1160 gosub *DivideIt:Dv=Dv+2 '31
1170 gosub *DivideIt:Dv=Dv+6 '37
1180 if inkey=chr(27) then S$=chr(27):end
1210 if N>1 then S$=S$+str(N):Ct=Ct+1
1220 'print S$
1280 if Q*Dv=N and N>0 then
1300 :if N>0 then Limit=sqrt(N):else Limit=0:endif
1310 :if Limit<>int(Limit) then Limit=int(Limit+1):endif
1330 :goto *Afterdo
this program finds, looking at cubes up to a million cubed, only a situation where the larger cube has only three unique prime factors:
427285^3 - 427284^3 = 523314^2 + 523315^2 = 547716131821
where 427285 = 5 * 97 * 881. The cube of course has the same prime factors, just repeated three times each.
The numbers have to be higher if they exist at all.
Posted by Charlie
on 2010-09-08 18:39:41