An exact solution can be acquired by computing $d_{x, y}(n)$ which is the number of distinct paths reaching $(x, y)$ for the first time after $n$ steps. The total number of paths $p_{x,y}(n)$ which contains $(x, y)$ after $n$ steps then has relationship:
$$p_{x, y}(n) = 8p_{x, y}(n-1) + d_{x, y}(n)$$
Using this we can express the expected number of distinct squares per path after $n$ steps, as counting the total number of distinct squares for each path and the total number of distinct paths crossing a square is equivalent when summing over all paths or all squares.
Then, saving some computation time we find by four-fold rotational symmetry that the expected number of distinct squares per path after $n$ steps is equivalent to:
$$1 + \frac{4}{8^{n}}\sum_{(x > 0, y \geq 0)} p_{x, y}(n)$$
How do we compute $d_{x, y}(n)$? We do it using matrices $M_{x, y}(n)$ which are initially zero everywhere except at $(0, 0)$ where they have value $1$. Then we apply a kernel convolution encoding the possible knight moves:
$$M'_{x, y}(n)=\begin{bmatrix}0&1&0&1&0\\
1&0&0&0&1\\
0&0&0&0&0\\
1&0&0&0&1\\
0&1&0&1&0\\\end{bmatrix}\star M_{x, y}(n-1)$$
Then $d_{x, y}(n)$ is the element at $(x, y)$ in $M'_{x, y}(n)$, and we set $(x, y)$ in the above matrix to zero to get $M_{x, y}(n)$ for future computation. Because we repeatedly set that coefficient to zero after each iteration it is that we count the number of distinct paths reaching $(x, y)$ for the first time, rather than all the paths that reach $(x, y)$ after $n$ steps. Unfortunately this does mean that for all possible $(x, y)$ we must compute these matrices a total of $n$ times.
I've implemented the above in Rust:
use gmp::mpz::Mpz;
use gmp::mpq::Mpq;
use rayon::prelude::*;
fn knight_step(d: Vec<Mpz>, w: i32) -> Vec<Mpz> {
let mut nd = vec![Mpz::new(); (w*w) as usize];
for &(dx, dy) in &[(-2, -1), (-2, 1), (-1, -2), (-1, 2), (1, -2), (1, 2), (2, -1), (2, 1)] {
let rx = (-dx).max(0)..(w-dx).min(w);
let ry = (-dy).max(0)..(w-dy).min(w);
for x in rx {
for y in ry.clone() {
let cx = x + dx;
let cy = y + dy;
nd[(x*w + y) as usize] += &d[(cx*w + cy) as usize];
}
}
}
nd
}
fn count_distinct(n: usize) -> Mpz {
let w = 4*n + 1; // Size of a side of the board.
let z = 2*n; // Origin is at (z, z);
let mut total_distinct = Mpz::new();
for x in z+1..w {
println!("{}", x);
let subproblems: Vec<_> = (z..w).collect::<Vec<usize>>().par_iter().map(|y| {
let mut d = vec![Mpz::new(); w*w];
d[z*w + z] = Mpz::from(1);
let mut p = Mpz::new();
for _ in 0..n {
d = knight_step(d, w as i32);
p = 8i64*p + &d[x*w + y];
d[x*w + y] = 0.into();
}
p
}).collect();
for s in &subproblems {
total_distinct += 4i64*s;
}
}
total_distinct
}
fn main() {
let n = 50;
let q = Mpq::ratio(&count_distinct(n), &Mpz::from(8).pow(n as u32));
println!("{}", q + &1.into());
}
Giving the exact result:
$$\frac{455207943209697100946821497094086408107332219}{11150372599265311570767859136324180752990208} \approx 40.82446$$
Best Answer
A single $1,2$ move by a knight feels 'asymmetrical', and so the symmetry may at first sight be surprising from that perspective.
However, note that the expected number of moves that you re calculating is a function of all possible moves the knight could be making, and for every move the knight can make, there is a 'mirror' move that the knight can make as well. Or, more to the point: for every path a knight may take, you can mirror that path in the bottom-left-to-top-right diagonal.
For example, the first move from $(1,1)$ can go to $(2,3)$ or to $(3,2)$, which are the 'mirror' moves of each other when mirrored in the diagonal. Likewise, moving from $(2,3)$ to $(3,5)$ in the one case would be mirrored by going from $(3,2)$ to $(5,3)$ in the other case.
Indeed, every sequence of moves has a perfect mirror, and since the choice of moves is perfectly random, each of these mirror sequences is equally likely. So, from that perspective, the symmetry is in fact easily explained.
If you still don't see it, here is one more thing that you could do: Start the knight on $(1,1)$, and record for all possible subsequent moves, how many times a knight could have visited a square for each of the squares given all possible moves/paths. Thus, at the start, the $(1,1)$ square has a value of $1$, and all other squares a value of $0$. After he first move, the $(1,1)$, $(2,3)$, and $(3,2)$ squares all have a value of $1$. After two moves, $(1,1)$ will have a value of $3$ (you can go back to $(1,1)$ from both $(2,3)$ and $(3,2)$), and a bunch more squares will have a value of $1$ ... but I think you'll quickly find that the number remains symmetrical along the diagonal ... and the expected number of moves (which is function of all possible paths) is therefore symmetrical as well.