All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars
 perplexus dot info

 Cubic AND Quartic Challenge (Posted on 2004-02-06)
What is the smallest positive integer that is the sum of two different pairs of (non-zero, positive) cubes?
_____________________________

What is the smallest positive integer that is the sum of two different pairs of integers raised to the 4th power? and how did you find it?

In other words what is the smallest x such that:
x = a^4 + b^4 = c^4 + d^4
(where x, a, b, c, and d are all different, non-zero, positive integers)?
_____________________________

Are you able to determine the answer without looking it up on the internet?

 See The Solution Submitted by SilverKnight Rating: 2.5000 (2 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
 solution | Comment 2 of 15 |
This is a problem which does call for a brute-force program or two:

For the cube problem, the following program produces a file, which, when sorted, can be read by a second program to check for and report duplicates:

```
5   open "cubt.txt" for output as #2

10   for Sum=2 to 2000

20     Lim=int(Sum/2)

30     for A=1 to Lim

40       B=Sum-A

50       Tot=A*A*A+B*B*B

60       print #2,using(15,0),Tot;:print #2,A;B

70     next

80   next

90   close

```

The sort is done by
sort cubt.txt > cubts.txt
The second program is:
```
DEFDBL A-Z

CLS

OPEN "cubts.txt" FOR INPUT AS #1

DO

LINE INPUT #1, l\$

n = VAL(LEFT\$(l\$, 15))

IF n = nPrev THEN

PRINT lPrev\$

PRINT l\$

PRINT

ct = ct + 1

IF ct / 12 = INT(ct / 12) THEN

END

END IF

END IF

nPrev = n

lPrev\$ = l\$

LOOP UNTIL EOF(1)

```

----
The first duplicate is for a^3+b^3 = 1729. The first few are:
```
1729 1  12

1729 9  10

4104 2  16

4104 9  15

13832 18  20

13832 2  24

20683 10  27

20683 19  24

32832 18  30

32832 4  32

39312 15  33

39312 2  34

40033 16  33

40033 9  34

46683 27  30

46683 3  36

64232 17  39

64232 26  36

65728 12  40

65728 31  33

110656 36  40

110656 4  48

110808 27  45

110808 6  48

```

----
The program for fourth powers is similar and finds the first such match at 635,318,657, as shown in the following output for the first few.
```
635318657      59     158

635318657     133     134

3262811042       7     239

3262811042     157     227

8657437697     193     292

8657437697     256     257

10165098512     118     316

10165098512     266     268

51460811217     177     474

51460811217     399     402

52204976672      14     478

52204976672     314     454

68899596497     271     502

68899596497     298     497

86409838577     103     542

86409838577     359     514

138519003152     386     584

138519003152     512     514

160961094577     222     631

160961094577     503     558

162641576192     236     632

162641576192     532     536

264287694402      21     717

264287694402     471     681

```

-------

The cube problem is famous for Ramanujan's notice of it in a taxicab with mathematician G.H.Hardy.
 Posted by Charlie on 2004-02-06 09:30:25

 Search: Search body:
Forums (0)