Magic square deluxe!

A magic square consists of a 3 × 3 3\times 3 grid filled in with the digits 1-9 such that every column, row, or diagonal adds up to the same constant (typically 15).

Is it possible to fill each box with a distinct integer such that the product {\color{#D61F06} \textbf{product}} of every column, row, or diagonal is the same number?

Note: The integers don't need to be the numbers 1-9.

Yes No

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

11 solutions

Geoff Pilling
Sep 26, 2018

Since, multiplying two numbers together is like adding exponents, you can take the above square, and replace n n with 2 n 2^n in each case, giving:

2 2 2^2 2 7 2^7 2 6 2^6
2 9 2^9 2 5 2^5 2 1 2^1
2 4 2^4 2 3 2^3 2 8 2^8

But the numbers must be between 1-9

Suyash Singh - 2 years, 8 months ago

Log in to reply

It says integer in the final question... But I've clarified the question.

Geoff Pilling - 2 years, 8 months ago

Log in to reply

If you read the note, you’d actually understand.

DOMINIC FRANCIS ALVAREZ - 2 years, 8 months ago

Nice! I believe that the smallest multiplicative magic square "product" is 216, e.g.,

18 .... 1 ..... 12

4 ..... 6 ..... 9

3 ..... 36 .... 2

Brian Charlesworth - 2 years, 8 months ago

Log in to reply

Can you prove that claim?

Marcus Neal - 2 years, 8 months ago

Log in to reply

I think you'd need to use unique factorisation: the product of row/columns can be factorised as p 1 i 1 p 2 i 2 p n i n p_1^{i_1} p_2^{i_2} \cdots p_n^{i_n} . Each entry of the square is also of this form.

In the case n = 1 n=1 you reduce yourself to standard magic squares and get the smallest product to be 2 12 = 4096 2^{12} = 4096 . In the case n = 2 n=2 you are looking at Graeco-latin square and the smallest is the one with primes 2 and 3 (i.e. the one given above). In the case n 3 n \geq 3 , you can show that i j 2 i_j \geq 2 (probably i j 3 i_j \geq 3 is true) and get a minimal product of at least 300.

Antoine G - 2 years, 8 months ago

Log in to reply

@Antoine G Why 2^12 and not 2^15=32768, though?

Also, if all powers need to be >=3 (which was basically proven by Yatin above), then minimal value would be 27000. :-B

C . - 2 years, 8 months ago

Log in to reply

@C . The "traditional" magic squares has integers from 1 to 9. If you add the same number to all numbers in a magic square, you still get a magic square. So let's add -1 to get a magic square with numbers from 0 to 8. 0 is not a positive integer but when you take the powers of 2, 2 0 = 1 2^0 = 1 .

So basically, since it is known that the smallest magic square is the standard one (minus 1 if you accept 0), the smallest "product magic square" with only one prime has a product of p 12 p^{12} which is much bigger than the actual 216.

Here is the square:

2^1 | 2^6 | 2^5

2^8 | 2^4 | 2^0

2^3 | 2^2 | 2^7

=

2 | 64 | 32

256 | 16 | 1

8 | 4 | 128

So to recap: with one prime it's a 2 12 2^{12} ; with two primes it's a Graeco-Latin square (with smallest elements being a = 2 0 , b = 2 1 , c = 2 2 , α = 3 0 , β = 3 1 , γ = 3 2 a=2^0, b=2^1,c=2^2, \alpha =3^0, \beta = 3^1, \gamma = 3^2 ); with three primes [using Yatin's comment which came some days afterwards] you get at least ( 2 3 5 ) 3 = 27000 (2 \cdot 3 \cdot 5)^3 = 27000

Antoine G - 2 years, 8 months ago

Would you accept a brute-force approach, Marcus? :)

C . - 2 years, 8 months ago

The reason this is the smallest, likely has to do with the center number.

This has to be:

  • > 4 ( since you need to have 4 positive integers less than it in 4 of the of the other boxes
  • have at least 2 prime factors (so that you can have four combinations that pass through the center

6 fits the bill!

Geoff Pilling - 2 years, 8 months ago

It can be easily proved that the product is actually the cube of the number in the central square. Hence, we only need to check cubes; 8,27 and 125 are cubes of primes we cannot have so many distinct factors for them. 64 too doesnt have enough factors required.

As for proof consider:

a b c d e f g h i

As the magic square and K as product.

K=abc=def=ghi=aei=beh=ceg=def

K=K^4/K^3 = (aei)(beh)(ceg)(def)/((abc)(def)(ghi) = e^3.

Yatin Khanna - 2 years, 8 months ago

Brilliant way of viewing it! Bravo!

Bert Seegmiller - 2 years, 8 months ago

Wow! Brilliant!

Abha Vishwakarma - 2 years, 8 months ago

Such simplicity much wow.

Animesh Baranawal - 2 years, 8 months ago

Of course (slapping my forehead)! Why didn't I think of that? Very nice!!

Ken Haley - 2 years, 8 months ago

I found exactly the same solution ;)

Hani Haddad - 2 years, 8 months ago

I did not read the note, I really do need to read more

Affan Morshed - 2 years, 8 months ago

Amazing!!!!

Archana Bhisikar - 2 years, 8 months ago

The solution can be generalized with any number set a^n+bc where c is -3,4,-1 on top row; 2, 0 -2 in middle row; and 1, -4, 3 on bottom row. The values a, n, and b can be anything and gives pretty much infinite solutions to the problem.

Brian Bohan - 2 years, 8 months ago

Log in to reply

Not quite sure I understand... 🤔

Geoff Pilling - 2 years, 8 months ago

Log in to reply

He's talking about the additive square of the exponents.

C . - 2 years, 8 months ago

how though

Heather Hawkins - 2 years, 6 months ago

A general solution could be of the form:

h f \sqrt{hf} b d h \sqrt{dh}
d b h \sqrt{bh} f
b f \sqrt{bf} h b d \sqrt{bd}

With the additional constraint:

bh = df.

Take b,d,f,h to be square numbers satisfying the constraint and you are done!

I think your solution is the best one.

Avery Bentley Sollmann - 2 years, 8 months ago

Log in to reply

Apart from b, d, h and f not exactly needing to be square numbers (see the 2^n solution), yes, I agree with you.

Howard Atkinson - 2 years, 8 months ago

Log in to reply

I said square numbers because in order to fill the grid with integers, the easiest way is to have b,d,f,g as squares.

Animesh Baranawal - 2 years, 8 months ago

Why did you choose b, d, h and f, may I ask?

Howard Atkinson - 2 years, 8 months ago

Log in to reply

I started off with 9 unknowns - a to i. But after reducing a couple of equations was left with only 4 : b,d,f,g.

Animesh Baranawal - 2 years, 8 months ago

The most prefectest answer i've seen

Shukraditya Bose - 2 years, 8 months ago
Michael Mendrin
Sep 26, 2018

Here's another solution

12 12 1 1 18 18
9 9 6 6 4 4
2 2 36 36 3 3

where all the products equal to 216 216

Very nice! As @Brian Charlesworth pointed out to me earlier this could be the one with the smallest integers!

Geoff Pilling - 2 years, 8 months ago

Log in to reply

oh, I didn't see Brian's comment posted earlier

Michael Mendrin - 2 years, 8 months ago

I love it! Hmm. I see that each row, column, diagonal has three factors each of 2 and 3. Do they have to have three? Could I have four factors of 2 and two of 3?? (A common sum of 144?)

Phillip Wagoner - 2 years, 8 months ago

Log in to reply

Any magic square of powers of any prime number or factor can be thrown in. For example, throwing in the prime number 5

60 60 9 9 50 50
25 25 30 30 36 36
18 18 100 100 15 15

Michael Mendrin - 2 years, 8 months ago

Log in to reply

And yet three of each - 2 and 3 and 5 - in each row, column, diagonal.

But I’m looking for a lower product than 216.

Phillip Wagoner - 2 years, 8 months ago

Log in to reply

@Phillip Wagoner These numbers are not distinct, however. But you get the idea.

4 4 1 1 2 2
1 1 2 2 4 4
2 2 4 4 1 1

Michael Mendrin - 2 years, 8 months ago

Log in to reply

@Michael Mendrin I’m looking for distinct numbers. Maybe based on powers of 2. But all I get is

2^1 2^8 2^3 2^6 2^4 2^2 2^5 2^0 2^7

And each product is 2^12. Decidedly not less than 216.

Michael, your use of factors of powers of 2 and 3, I see, is the key. 1,2,3,4,6,9,12,18,36 increases much more slowly than powers of 2 alone: 1,2,4,8,16,32,64,128,256.

A beautiful solution, Michael. Thanks for sharing.

Phillip Wagoner - 2 years, 8 months ago

Log in to reply

@Phillip Wagoner For distinct integers, 216 is the minimum possible product.

Michael Mendrin - 2 years, 8 months ago

@Phillip Wagoner Nope, i just ran a computer program to check all possible products up to 220. Only 8 solutions exist with that restriction: the rotations and mirror images of what Michael provided.

However, the first in "alphabetical" order would be 2 9 12 / 36 6 1 / 3 4 18 :-B

C . - 2 years, 8 months ago

Not sure you can get to LESS than 3 factors... Looking on the separate power-squares, each of them has a diagonal where the product is formed with 1 factor from each row/column.

C . - 2 years, 8 months ago

The reason this is the smallest, likely has to do with the center number.

This has to be:

  • > 4 ( since you need to have 4 positive integers less than it in 4 of the of the other boxes
  • have at least 2 prime factors (so that you can have four combinations that pass through the center)

6 fits the bill!

Geoff Pilling - 2 years, 8 months ago
Bruce Rivii
Oct 8, 2018

You could replace every number with 5

Numbers need to be distinct.

Christian Wen - 2 years, 8 months ago

Don't know how to make boxes in comment, so... Row 1: AD--BE--CF Row 2: CE--AF--BD Row 3: BF--CD--AE Substitute any value for the alphabet, the product will be ABCDEF.

Santhosh Paripalli - 1 year, 10 months ago

The idea is that say that you have: 35 6 9 5 34 11 10 10 30 The number is 50 (Sorry about the diagonals, plz don’t judge me for that, or the line thing, it was a square when I typed it(if there’s an error at all))

There have been many squares that sum to a constant (50 in your case)... but the problem was asking about MULTIPLYING the numbers to get to a constant product.

Also, you have the number 10 twice in there. All the numbers need to be distinct. :-B

And saying "sorry about the diagonals" doesn't cancel the fact that diagonals not having the same sum WILL make your square not a perfectly magic one, even if it did have all numbers distinct.

C . - 2 years, 8 months ago
Meghan McCutchan
Oct 12, 2018

How about all 1’s?

The integers need to be distinct.

Geoff Pilling - 2 years, 8 months ago

Ah, my mistake

Meghan McCutchan - 2 years, 7 months ago
Hunter Gray
Oct 12, 2018

Assuming 0 is a possible number, out it in the center of the box for a consistent product with any other number.

The problem then becomes the outer rows and columns... 🤔

Geoff Pilling - 2 years, 8 months ago
Stephan E
Oct 10, 2018

Just fill each field with the same number. It works with any number.

K T
Oct 9, 2018

Convert the multiplication problem into a summation problem bu using the numbers in the given solution as exponents to any fixed integer base where |base| > 1.

Trevor Boggs
Oct 9, 2018

All numbers 1

That would work, except that the integers all need to be different.

Geoff Pilling - 2 years, 8 months ago
Bill Weihmiller
Oct 7, 2018

If the digits don't have to be 1 - 9, they could all be identically 1 or 0, so the products are 1 or 0. Found two cases in half a second so I bet clever people more interested could easily find more.

The question specified distinct integers.

Paul Cockburn - 2 years, 8 months ago

You can use the original pattern to create an infinite number of different possibilities. Just add a random constant K to each square and the results of the rows, columns and diagonals will now be 15 + 3K

Yuri José Vieira Pandolfi - 2 years, 8 months ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...