3.(15%) In a 2D n ✖ n checkerboard as shown in Figure 2, given two integers p and a (1≤p ≤ q≤n), write the formula of the number of all possible squares in the checkerboard with side length s satisfying p ≤s≤g. Write the result in a formula of n, p, and q.
