Question

In: Advanced Math

For all n > 2 except n = 6, show how to arrange the numbers 1,2,...,n2...

For all n > 2 except n = 6, show how to arrange the numbers 1,2,...,n2 in an n x n array so that each row and column sum to the same constant.

Solutions

Expert Solution

In any magic square, the first number i.e. 1 is stored at position (n/2, n-1). Let this position be (i,j). The next number is stored at position (i-1, j+1) where we can consider each row & column as circular array i.e. they wrap around.
Three conditions hold:

1. The position of next number is calculated by decrementing row number of previous number by 1, and incrementing the column number of previous number by 1. At any time, if the calculated row position becomes -1, it will wrap around to n-1. Similarly, if the calculated column position becomes n, it will wrap around to 0.

2. If the magic square already contains a number at the calculated position, calculated column position will be decremented by 2, and calculated row position will be incremented by 1.

3. If the calculated row position is -1 & calculated column position is n, the new position would be: (0, n-2).
magic square of size 7 is

20 12 4 45 37 29 28
11 3 44 36 35 27 19
2 43 42 34 26 18 10
49 41 33 25 17 9 1
40 32 24 16 8 7 48
31 23 15 14 6 47 39
22 21 13 5 46 38 30


Related Solutions

[Discrete math] Show that it is possible to arrange the numbers 1, 2, . . ....
[Discrete math] Show that it is possible to arrange the numbers 1, 2, . . . , n in a row so that the average of any two of these numbers never appears between them. [Hint: Show that it suffices to prove this fact when n is a power of 2. Then use mathematical induction to prove the result when n is a power of 2.] I saw the solution but I don't understand why permutation pi is using here.....
Show by induction that for all n natural numbers 0+1+4+9+16+...+ n^2 = n(n+1)(2n+1)/6.
Show by induction that for all n natural numbers 0+1+4+9+16+...+ n^2 = n(n+1)(2n+1)/6.
Let n be a positive integer. Prove that two numbers n2+3n+6 and n2+2n+7 cannot be prime...
Let n be a positive integer. Prove that two numbers n2+3n+6 and n2+2n+7 cannot be prime at the same time.
For any r, s ∈ N, show how to order the numbers 1, 2, . ....
For any r, s ∈ N, show how to order the numbers 1, 2, . . . , rs so that the resulting sequence has no increasing subsequence of length > r and no decreasing subsequence of length > s.
Consider the sequence: x0=1/6 and xn+1 = 2xn- 3xn2 | for all natural numbers n. Show:...
Consider the sequence: x0=1/6 and xn+1 = 2xn- 3xn2 | for all natural numbers n. Show: a) xn< 1/3 for all n. b) xn>0 for all n. Hint. Use induction. c) show xn isincreasing. d) calculate the limit.
All of the reactions shown are oxidationreduction reactions except A) N2(g) + O2 (g) → 2...
All of the reactions shown are oxidationreduction reactions except A) N2(g) + O2 (g) → 2 NO(g) B) 2 Fe2O3 (s) → 4 Fe(s) + 3 O2 (g) C) Zn(s) + 2 HCl(aq) → ZnCl2 (aq) + H2 (g) D) CH4(g) + 2 O2 (g) → CO2(g) + 2 H2O(l) E) K2SO4(aq) + BaCl2(aq) → BaSO4(s) + 2 KCl(aq)
Show that among all collections with 2n-1 natural numbers in them there are exactly n numbers...
Show that among all collections with 2n-1 natural numbers in them there are exactly n numbers whose sum is divisible by n.
For all integers n > 2, show that the number of integer partitions of n in...
For all integers n > 2, show that the number of integer partitions of n in which each part is greater than one is given by p(n)-p(n-1), where p(n) is the number of integer partitions of n.
A sequence {an} is given by: an = n2 - 1, n € N. Show that it is not an arithmetic progression (A.P)?
A sequence {an} is given by: an = n2 - 1,   n € N. Show that it is not an arithmetic progression (A.P)?   
1- Show that (n^3+3n^2+3n+1) / (n+1) is O (n2 ). Use the definition and proof of...
1- Show that (n^3+3n^2+3n+1) / (n+1) is O (n2 ). Use the definition and proof of big-O notation. 2- Prove using the definition of Omega notation that either 8 n is Ω (5 n ) or not. please help be with both
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT