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

Home > Numbers
Beyond Fermat (Posted on 2008-05-05) Difficulty: 3 of 5
To show that Fermat's Last Theorem applies only to sums of two terms, Fred asked his friends, Alice, Bob, Carol and Diane, to list three perfect cubes that added up to another perfect cube. Each came up with his or her own list, different from the others'.

All except Diane limited their lists of three cubes to the first 12 cubes. Alice and Bob had two of the same numbers in their lists, but Carol's list had no numbers in common with either of those lists.

Diane, not limiting herself to the first 12 cubes, did use in her list two of the sums from among the three sums of cubes found by Alice, Bob and Carol.

What were Carol's and Diane's lists of cubes?

See The Solution Submitted by Charlie    
Rating: 3.0000 (3 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution Computer assist | Comment 3 of 4 |

The C program below prints the following 12 rows of data:
1.            1    216      512      729      729
2.            8  1728    4096    5832    5832
3.          27      64      125      216      216
4.          27  1000    5832    6859    6859
5.          27  5832  13824  19683  19683
6.          64  4913  10648  15625  15625
7.        216    512    1000    1728    1728
8.        343  2744    4913    8000    8000
9.        729  1728    3375    5832    5832
10.    1331  3375  19683  24386  24386
11.    1728  4096    8000  13824  13824
12.    5832  6859    9261  21952  21952
(The last column was for data comparison).

The 12 cubes are 1,8,27,64,125,216,343,512,729,1000,1331 and 1728.

Rows 1 and 7 share 216 and 512, thus these are the numbers chosen by Alice and Bob.  The only other row having 3 different cubes, equal to or below 1728, and having nothing in common with Alice and Bob is row 3 and thus Carol.

The sums of Alice and Bob's cubes are 729 and 1728.  Row 9 contains these two values and satisfies Diane's requirements.

Carol 27, 64, 125
Diane 729, 1728 and 3375 (the latter being the 15th cube).

#include <stdio.h>
#include <conio.h>
#include <math.h>

int a,b,c,d;
int m,n,o;
int y,z;

void main()
{
 clrscr();
 printf("Top of Screen\n");
 for (a=1;a<=30;a++)
 {
   for (b=1;b<=30;b++)
   {
     for (c=1;c<=30;c++)
     {
       y = pow(a,3)+pow(b,3)+pow(c,3);
     for (d=1;d<30;d++)
     {
       z=pow(d,3);
       if (y==z)
       {
        if ((a<b) && (b<c))
         {
         m=pow(a,3);
         n=pow(b,3);
         o=pow(c,3);
         printf("   %d   %d    %d    %d    %d\n", m,n,o,y,z);
           }
         }
        }
       }
     }
   }
  getch();
  return;
  }




<o:p></o:p>
  Posted by brianjn on 2008-05-06 22:00:45
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 (11)
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