3. 1
N=5
Fill in middle cell of the top row.
Move towards right diagonal.
We cross the grid
1
2
If we cross top boundary , go down to
the column and fill in next number
Rule 1
4. 1
3
2
Move towards right diagonal.
It is unfilled . Fill it with 3
1
4
3
2
Move towards right diagonal.
Boundary crossed. Go to left most cell
Rule 2
12. clear all
% Fill in a odd magic squre from 1 to N^2
% In general numbers must form an Arithmetic
%Progression
N=7; % N must be odd
A=zeros(N,N);
j=1+(N-1)/2 ; % fill centre cell in the first row
i=1; A(i,j)=1
for K=2:N*N
i=i-1; j=j+1; % Advance towards right diagonal
% putback into the matrix if gone out
if and(i<1, j==N+1) i=2; j=N; end
if and (j<=N , i<1) i=N; end
if and (i>0 , j>N) j=1; end
if A(i,j)~=0 i=i+2; j=j-1 ; end
A(i,j)=K;
end
A
30 39 48 1 10 19 28
38 47 7 9 18 27 29
46 6 8 17 26 35 37
5 14 16 25 34 36 45
13 15 24 33 42 44 4
21 23 32 41 43 3 12
22 31 40 49 2 11 20
A
13. 1. How to create 4x4 magic square
2. How to create mxm magic square
where m =‘odd number’x2
3. What is determinant of odd magic squares
(in relation to the magic sum and why?.)
4. What is so special about Ramanujan’s 4x4
magic square
15. 22/12/1887 is his date of birth. See the top row
Each column/sum is 139
Both Diagonal sum is 139
16. Corner sum is 139
Blue colour number sum is 139
Pink colour number sum is 139
Blue colour sum is 139
Orange colour sum is 139
Pea Green colour sum is 139
All same colour sum is 139
Blue colour sum is 139
Dark green colour sum is 139