View Full Version : magic square


Aljaber
Asslamo 3laykom

here is 5 rows , 5 columns with 25 squares

what is the right arrange of numbers in these squares that gives the next results :

- the sum of the numbers in any row = 65

- the sum of the numbers in any column = 65 ;)

peace be upon you

a_elhoseeny
asslam alycom

hope you like it
and if you want the algorism tell me

regards
ahmed elhoseeny

Aljaber
Asslamo 3laykom

Originally posted by a_elhoseeny
asslam alycom

hope you like it
and if you want the algorism tell me

regards
ahmed elhoseeny

well done ahmad , i will appreciate posting the algorithm ;)

peace be upon you

uniball
I tend to solve it but in the reversed way ;-)

a_elhoseeny
asslam alycom

good uniball
i think it is the same like mine (it is just mirror)

any way thats the algorithm

regards
ahmed elhoseeny

uniball
Yes that's trye. I follow the direction from Left to Right.

Aljaber
Asslamo 3laykom

guys you are persistences , ok i had wrote a little research about ,

the magic squares with odd number of squares in row or column has many featuers

and i will tell you about some of them you deserve it


-*- the center square must have a specific number with the following formula :

c = ( s + 1 ) / 2

when :
c -> the value in the center square
s -> the number the squares

in our case

c = (25+1)/2
c= 13
the center square must be 13
you must figure it now uniball and a_elhoseeny the mirror case can not
happen with the center square


-**- another thing the sum of the each row or column can be specified by the following formula :

t = c * n

when :
t -> the sum of the numbers in each row or column
c -> the value of the center square
n -> the number of the squares in each row or column

in our case

t = 13 * 5 = 65 ;)

maybe later we will talk about the compound magic squares

peace be upon you