Trapped Knight Sequence
JavaScript (ES7), &nbsp;182&nbsp; 181 bytes



f=(n,[x,y]=[2,1],a=[...Array(4e3)].map((_,n)=&gt;[1,-1].map(s=&gt;(i&amp;1?-s:s)*(i+s*n-(n&gt;0?n:-n)&gt;&gt;1),i=n**.5|0,n-=i*++i)))=&gt;n--?f(n,a.find(([X,Y],j)=&gt;(i=j,(x-X)*(y-Y))**2==4),a,a[i]=[]):i+1


Try it online!

How?

A slightly modified version of my answer to the The Path Of The Wildebeest is definitely shorter (and faster) than that. But I wanted to try a different approach. Incidentally, I think it might be easier to implement this method in some esolangs.

Algorithm:


Initialization: we build the full list of coordinates for the first 4000 squares of the spiral, which is enough to process all moves of the knight before it gets trapped (the highest reached square being \$3199\$).
We look for the first square \$(X,Y)\$ such that:

$$((x-X)\times(y-Y))^2=4$$

where \$(x,y)\$ are the current coordinates of the knight.

The above condition is true only if \$|x-X|=1\$ and \$|y-Y|=2\$, or \$|x-X|=2\$ and \$|y-Y|=1\$, which covers all possible knight moves.
We set \$(x,y)=(X,Y)\$ and invalidate the entry in the list so that it's not picked a second time.
We either restart at step 2 or return the last index that was found if we're done.




Node.js, 155 bytes



n=&gt;(g=(x,y)=&gt;n--?g(Buffer('QHUbcdWJ').map(m=c=&gt;g[i=4*((x+=c%6-2)*x&gt;(y+=c%7-2)*y?x:y)**2,i-=(x&gt;y||-1)*(i**.5+x+y)]|i&gt;m||(H=x,V=y,m=i))|H,V,g[m]=1):m+1)(1,2)


Try it online!