The sequence of integers in the row of squares and in each of the two columns of squares form three distinct arithmetic sequences. What is the value of N?
n=28