I actually wrote a program for this, sort of, in python with pygame, and although I did it with an 8x8 board, you could easily scale it up to a 32x32 board, and then figure out the pattern and work backwards. I will make a video on my program, but in the mean time here is my code:
pastebin.com/YQSrafqfAnd are attached images. It is color coded as follows: Pink is initial, red is 1 move away, orangy-red is 2 moves away, orange is 3 moves away, yellow is 4 moves away, green is 5 moves away, and blue is 6 moves away. :
Edge case: placing your knight on the outer two rows / columns means it will reach anywhere in 5 moves, except the 8 squares d2,e2,d7,e7,b4,b5, and g4,5 where it can reach anywhere within 4 moves;
Center case: placing your knight here allows it to reach anywhere within 4 moves;
Corner case: placing your knight here allows it to reach anywhere within 5 moves, but the opposite corner is going to take 6 moves to get to;
The program I wrote gave me some other insight, which I plan to summarize into a video. But the key thing to take away (although if you play a lot of chess you somewhat already know) is that in a 7x7 grid, the knight can get to any square in 2 or three moves, except going diagonally by two squares, which takes four moves. Recognizing if a square is 2 moves away is rather easy for a knight, but three squares is not always obvious, but if the square is within 3 units from the Knight, is not two moves away, or diagonal to the knight by 2 units, then it is always three moves away.
I will make a forum post and youtube video of this later, after I improve some aspects. I would like to introduce placing pieces on the board to restrict the Knight. It shouldn't be too hard to change the code by changing the "while" statement so that it doesn't stop at 64 squares, removing the restriction that squares need to be between 1 and 8, and fiddle with the module PyGame so that it displays more than just 8 squares, and make the color list longer.... I will do something about this and come back with some photos maybe.
I made something like this for an infinite board but the pattern gets boring rather quickly, and I got my computer stolen so I don't know where it is. But it is repetitive, somewhat octagonal, and I'm sure there's a formula for it, but it's not clear to me how you would write the formula.