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.
%I A183041 #22 Mar 02 2021 17:20:50 %S A183041 3,2,1,2,3,4,3,4,5,6,5,6,7,8,7,8,9,10,9,10,11,12,11,12,13,14,13,14,15, %T A183041 16,15,16,17,18,17,18,19,20,19,20,21,22,21,22,23,24,23,24,25,26,25,26, %U A183041 27,28,27,28,29,30,29,30,31,32,31,32,33,34,33,34,35,36 %N A183041 Least number of knight's moves from (0,0) to (n,1) on infinite chessboard. %C A183041 Row 2 of the array at A065775. %C A183041 Apparently a(n)=A162330(n), n>0. - _R. J. Mathar_, Jan 29 2011 %F A183041 T(0,1)=3, T(1,1)=2, and for m>=1, %F A183041 T(4m-2,1)=2m-1, T(4m-1,1)=2m, T(4m,1)=2m+1, T(4m+1,1)=2m+2. %F A183041 G.f.: (2*x^5-2*x^4+x^3-x^2-x+3) / ((x-1)^2*(x+1)*(x^2+1)). - _Colin Barker_, Feb 19 2014 %e A183041 a(0)=3 counts (0,0) to (2,1) to (1,3) to (0,1). %o A183041 (Python) %o A183041 def a(n): %o A183041 if n < 2: return [3, 2][n] %o A183041 m, r = divmod(n, 4) %o A183041 return [2*m+1, 2*m+2][r%2] %o A183041 print([a(n) for n in range(70)]) # _Michael S. Branicky_, Mar 02 2021 %Y A183041 Cf. A065775, A018837, A183042-A183053. %K A183041 nonn %O A183041 0,1 %A A183041 _Clark Kimberling_, Dec 20 2010