the pattern is as follows:
M N
1 1
1 2
2 1
1 3
2 2
3 1
1 4
2 3
3 2
4 1
Use that formula and you'll see that it calculates the 0 based index correctly for the above.
Then with induction:
let P(m,n) be the position
P(m,n) = big equation.
Now, we have to prove that P(m+1,n-1)...