Almost a Square

A square with sides of integral length (i.e., the side lengths are integers) could be made with 25 square units. Make a rectangle with sides of integral length and an area of 24 square units, but construct the rectangle so it comes as close as possible to being a square. What are the dimensions of the rectangle?

Repeat this construction by starting with other square numbers. In general, how do you express the side lengths of these special rectangles when 1 is subtracted from any square number n2? Show your generalization using algebra, a table of results, and supporting pictures.

Extension
Consider the same question above, but now let 1 be added to the area of a square. For example, start again with a square of area equal to 25 square units. Add 1 to 25. Now, make a rectangle with sides of integral length and an area of 26 square units, but construct the rectangle so it comes as close as possible to being a square. What are the dimensions of the rectangle?

Again, repeat this same construction by starting with other square numbers. Could you state a generalization similar to your generalization in the above problem? Support your answer with a table and pictures.

(Source: Adapted from Mathematics Teaching in the Middle School, Nov-Dec 1997)