Doubly Attacking Queens

Place the maximum number of chess queens on an NxN chessboard, such that each queen attacks exactly 2 other queens. Solve for N=2,3,4,5. (I'm interested in higher N, but I think computer searches may be needed to prove maximality.)

There are two different ways to analyze this:

  1. A queen can attack only as far as another queen. Thus, for three queens in a line, the center one would be attacked by two queens, but the end queens would only be attacked by one (the center one.) With this interpretation, you can easily place N+1 queens on the board by putting N along a side and 1 in a corner.
  2. A queen can attack through other queens. This simply means that any line which contains 2 queens can contain no more than 3 queens. (You could think of the problem then as placing the maximum number of checkers on the board such that each checker is in line with exactly two other checkers horizontally, vertically, or diagonally.)
It's my theory that the best solutions will work for both interpretations above (you won't need to find three queens in a line), but I don't mind being proven wrong.

Source: Original.

Mail to Ken