You are currently browsing the tag archive for the ‘cubes’ tag.

When do 2 squares equal 2 cubes?

Following on from the hollow square investigation this time I will investigate what numbers can be written as both the sum of 2 squares, 2 cubes and 2 powers of 4. i.e a2+b2 = c3+d3 = e4+f4.

Geometrically we can think of this as trying to find an array of balls such that we can arrange them into 2 squares, or we can rearrange them and stack them to form 2 cubes, or indeed we can arrange them into 2 4-dimensional cubes. I’ll add the constraints that all of a,b,c,d,e,f should be greater than 1 and that the pair of squares or cubes (etc) must be distinct. Therefore we can’t for example have 2 squares the same size.

Infinite solutions

Let’s look at why we can easily find infinite solutions if the squares or cubes (etc) can be the same size.

We want to find solutions to:
a2+b2 = c3+d3 = e4+f4.

so we look at the powers 2,3,4 which have LCM of 12. Therefore if we choose powers with the same base we can find a solution. For example we chose to work with base 2. Therefore we choose

a = 26, b = 26, which gives 212+212
c = 24, d = 24, which gives 212+212
e = 23, f = 23, which gives 212+212

Clearly these will be the same. So we can choose any base we wish, and make the powers into the same multiples of 12 to find infinite solutions.

Writing some code

Here is some code that will find some other solutions:


list1=[]
for a in range(2, 200):
 for b in range(2,200):
  list1.append(a**2+b**2)

list2=[]
for j in list1:
 for c in range(2,200):
  for d in range(2,200):
   if c**3+d**3 == j:
    list2.append(c**3+d**3)
print(list2)

for k in list2:
 for e in range(2,200):
  for f in range(2,200):
   if k == e**4+f**4:
    print(k,e,f)

This returns the following solutions: 8192, 18737, 76832. Of these we reject the first as this is the solution 212+212 which we found earlier and which uses repeated values for the squares, cubes and powers of 4. The 3rd solution we also reject as this is formed by 14 4 + 14 4. Therefore the only solution up to 79202 (we checked every value up to and including 1992 + 1992) is:

18737 = 642+1212 = 173+243 = 114+84.

Therefore if we had 18,737 balls we could arrange them into 2 squares, a 64×64 square and a 121×121 square. Alternatively we could rearrange them into 2 cubes, one 17x17x17 and one 24x24x24. Or we could enter a higher dimensional space and create 2 tesseracts one with sides 11x11x11x11 and the other with 14x14x14x14.

With only 1 solution for around the first 80,000 numbers it looks like these numbers are quite rare – could you find another one? And could you find one that also satisfies g5+h5?

Exploration Guide

A comprehensive 70 page pdf guide to help you get excellent marks on your maths investigation. Includes how to choose a topic, over 70 topic ideas, marking criteria guidance, Pearson's Product method, common students mistakes, in-depth topic examples and much more! [Will be emailed within the same day as ordered].

$5.50

Website Stats

  • 7,139,847 views

Recent Posts

Follow IB Maths Resources from British International School Phuket on WordPress.com