Let $n$ and $k$ be positive integers. A baby uses $n^2$ blocks to form a $n\times n$ grid, with each of the blocks having a positive integer no greater than $k$ on it. The father passes by and notice that: 1. each row on the grid can be viewed as an arithmetic sequence with the left most number being its leading term, with all of them having distinct common differences; 2. each column on the grid can be viewed as an arithmetic sequence with the top most number being its leading term, with all of them having distinct common differences, Find the smallest possible value of $k$ (as a function of $n$.) Note: The common differences might not be positive. Proposed by Chu-Lan Kao