A323815 Squares where A323811 gets stuck.
1377, 2849, 4464, 6785, 8910, 9729, 15752, 18914, 32639, 37127, 40185, 57629
Offset: 1
Keywords
Crossrefs
Cf. A323811.
This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
Daniël Karssen has authored 49 sequences. Here are the ten most recent ones:
The board is numbered following a square spiral: 16--15--14--13--12 : | | : 17 4---3---2 11 28 | | | | | 18 5 0---1 10 27 | | | | 19 6---7---8---9 26 | | 20--21--22--23--24--25 . From _M. F. Hasler_, Nov 06 2019: (Start) At move 2015, the knight lands on a(2015) = 2083, from where no unvisited squares can be reached. So the knight moves back to a(2016) = a(2014) = 2466, from where it goes on to the unvisited square a(2017) = 2667. Similarly, at moves 2985, 3120, 3378, 7493, 8785, 9738, 10985, 11861, 11936, 12160, 18499, 18730, 19947 and 22251, the knight get "trapped" and has to move to the previous square on the next move. On move 23044, the same happens on square 25808, and the knight must move back to square a(23045) = a(23043) = 27111. However, there is still no unvisited square in reach, so the knight has to make another step back to a(23046) = a(23042) = 28446, before it can move on to a(23047) = 29123. (End)
Nmax=1e5 /* number of terms to compute */; {local( K=[[(-1)^(i\2)<<(i>4),(-1)^i<<(i<5)]|i<-[1..8]], pos(x,y)=if(y>=abs(x),4*y^2-y-x,-x>=abs(y),4*x^2-x-y,-y>=abs(x),(4*y-3)*y+x,(4*x-3)*x+y), coords(n, m=sqrtint(n), k=m\/2)=if(m<=n-=4*k^2, [n-3*k, -k], n>=0, [-k, k-n], n>=-m, [-k-n, k], [k, 3*k+n]), U=0, Umin=0, t(x, p=pos(x[1],x[2]))=if(pt(x+K), K))[1], back=0); my(A=List(0)); for(n=1, Nmax, back||U+=1<<(A[n]-Umin); while(bittest(U,0), U>>=1; Umin++); listput(A, nxt(A[n])); if(A[n+1] != oo, back=0, A[n+1]=A[n+1-back+=2])); print("Index of the last term: ", #A-1); A323809(n)=A[n+1];}
The board is numbered with the square spiral: 17--16--15--14--13 : | | : 18 5---4---3 12 29 | | | | | 19 6 1---2 11 28 | | | | 20 7---8---9--10 27 | | 21--22--23--24--25--26 See A323809 for examples where "backtracking" happens. - _M. F. Hasler_, Nov 06 2019
A323808(n)=A323809(n-1)+1 \\ M. F. Hasler, Nov 06 2019
Comments