In a set of lattice points, define a "grid square" to be a square whose vertices are lattice points and sides are along the axis. Define a "tilted square" to be a square whose vertices are lattice points and sides are not along the axis.
Prove that in a \( n \times n \) grid, the number of grid squares and tilted squares, is equal to the number of tilted squares in a \( (n+1) \times ( n+1 ) \) grid.
For example, in the above image, the \( 2 \times 2 \) grid has 5 grid squares and 1 tilted square, and the \( 3 \times 3 \) grid has 6 tilted squares.
For the solution, scroll and see the last rooted comment. It's been downvoted so that there is spoiler space for you to think about this problem.