05AB1E, 27 25 bytes
Thanks to Emigna for saving 2 bytes!
Uses 1-indexed coordinates. Code:
Code:
F•eĆ•SÍü‚Dí«δ+€`Ùʒ{`9‹*0›
Uses the 05AB1E encoding. Try it online!
Explanation:
F # Do the following <input_1> times..
•eĆ•SÍ # Push [-1, -2, 1, 2, -1]
ü‚ # Pairwise pairing: [[-1, -2], [-2, 1], [1, 2], [2, -1]]
D # Duplicate the array
í # Reverse each element
« # Concatenate to the previous array
This gives us the following array:
[[-1, -2], [-2, 1], [1, 2], [2, -1], [-2, -1], [1, -2], [2, 1], [-1, 2]]
Which are the deltas of the moves of the knight.
δ+ # Addition vectorized on both sides
€` # Flatten each element
Ù # Uniquify
ʒ # Keep elements which..
{`9‹ # Has a maximum element smaller than 9
*0› # And a minimum element larger than 0