Ken's Puzzle of the Week

Lines for Squares

How many lines are needed to make exactly N squares?  Solve for 1<=N<=15.

For example, to make five squares, six lines are needed (draw a 2x2 grid, to give four 1x1 squares and one 2x2 square.)  But to make exactly four squares, seven lines are needed.

Easier Extension: What is the largest number of squares which can be drawn with M lines?

Source: Original.

Mail to Ken