solution is 1561.

simple method is to make general term of the middle element of each row using A.P then finding the 40th element

general term will be n(n-1)+1

n=1 gives 1

n=2 gives 3

n=3 gives 7

these all are middle term of each row so on putting 40 middle number of 40th row will be obtained