As the alternate colours arrangement is possible only for odd tiles and in a row the number of tiles are Ö(m2/n2) = m/n
Now put the m/n = 3+{(r-1) *2} -------------------------(1)
It is a simple AP rth term formula with 3 as first term and 2 is the common difference, which yields the value of r.
Now total replacements are
= 4 * [(r-1)+(r-2)+(r-3)+..........+1]
Summation of the (r-1) terms where first term is 1 and last term is (r-1) and common difference is 1
= 4*[ {(r-1) * (1+r-1)}/2
= 2*(r-1) * (r) ---------------------- (2)
| m/n | 3 | 5 | 7 | 9 | 11 | 13 |
| r by (1) | 0 | 2 | 3 | 4 | ? | ? |
| Total replacements by (2) | 0 | 4 | 12 | 24 | ? | ? |
You should try to solve ??? marked fields for practice.
Note : I have taken both the diagonals having red tiles initially. But if you want to say that only one diagonal has red tiles than you should add (m/n)-1 in the final result [Total replacements by (2) ] to get the total replaced tiles.