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

Home > Numbers
Two possible sums (Posted on 2013-11-08) Difficulty: 3 of 5
Each of the numbers 3, 10, 17, 24, 29, 36, ... can be written as a sum of three cubes of positive integers - not necessarily all distinct.

What is the smallest member in this series that allows more than one way of such representation?

To avoid misunderstanding - distinct order in the summation of the cubes will not count as a different set - e.g. (8,1,1) , (1,8,1) and (1,1,8) represent the same triplet.

No Solution Yet Submitted by Ady TZIDON    
No Rating

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution computer solution Comment 1 of 1

DEFDBL A-Z

OPEN "2posssum.txt" FOR OUTPUT AS #2
FOR a = 1 TO 150
  PRINT a;
  ac = a * a * a
FOR b = a TO 150
  bc = b * b * b
FOR c = b TO 150
  cc = c * c * c
  sum = ac + bc + cc
  PRINT #2, USING "######### ### ### ### ######### ######### #########"; sum; a; b; c; ac; bc; cc
NEXT
NEXT
NEXT

CLOSE

produces a file, which is then sorted and then read by:

DEFDBL A-Z
CLS
OPEN "2posssum.txt" FOR INPUT AS #1
DO
  LINE INPUT #1, l$
  IF LEFT$(l$, 10) = LEFT$(p$, 10) THEN
     PRINT p$: PRINT l$: PRINT
     ct = ct + 1
     IF ct > 10 THEN END
  END IF
  p$ = l$
LOOP UNTIL EOF(1)

which produces the first few pairs of the type requested:

        bases of
 sum      cubes                 cubes
 
 251   1   5   5         1       125       125
 251   2   3   6         8        27       216
1009   4   6   9        64       216       729
1009   1   2  10         1         8      1000
1366   2   3  11         8        27      1331
1366   5   8   9       125       512       729
1457   6   8   9       216       512       729
1457   1   5  11         1       125      1331
1459   4   4  11        64        64      1331
1459   1   9   9         1       729       729
1520   2   8  10         8       512      1000
1520   4   5  11        64       125      1331
1730   1   9  10         1       729      1000
1730   1   1  12         1         1      1728
1737   1   2  12         1         8      1728
1737   2   9  10         8       729      1000
1756   1   3  12         1        27      1728
1756   3   9  10        27       729      1000
1763   2   3  12         8        27      1728
1763   6   6  11       216       216      1331
1793   1   4  12         1        64      1728
1793   4   9  10        64       729      1000

so 251 is the first member of the series that allows more than one representation as the sum of positive cubes.

If the cubes needed to be distinct then the smallest would be 1009.


  Posted by Charlie on 2013-11-08 17:25:13
Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (0)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (0)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2024 by Animus Pactum Consulting. All rights reserved. Privacy Information