I discovered this pattern and decided to print it.
1 2 5 10 17
3 4 7 12 19
6 8 9 14 21
11 13 15 16 23
18 20 22 24 25
Rule here is to move from (0,0) to (0,1) to (1,0) to (1,1) to (0,2) to (2,0) to (1,2) to (2,1) to (2,2) and so on upto NxN matrix.
I have a very complex approach for printing it. Is there any easy way to print this pattern?
Update: Added one more row and column