The Problem: Let $S_0,S_1,S_2,\dots$ be a symmetric simple random walk started from $0$. Find the probability that the random walk does not visit the set $\{-2,2\}$ up to time $2n$: $$P(\vert S_k\vert\ne2\text{ for }k=1,2,\dots,2n)=?$$
My Questions: I know that we could do this by counting the number of paths that satisfy the requirement, which means that such paths will stay in the set $\{-1,0,1\}$. I am stuck on this step. I tried using the Catalan numbers, but those do not account for the restriction needed in this problem.
Any hints on how to go about this counting problem?
For the random walk to not have hit $\{-2,2\}$ by time $2$, it must have taken a $+1$ step and then a $-1$ step or the other way round. It thus stays within $[-1,1]$ with probability $\frac12$, and if it does not hit $\{-2,2\}$ then it is at $0$. Repeat this $n$ times, and we get that the walk does not visit $\{-2,2\}$ by time $2n$ with probability $\frac1{2^n}$.