login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A018838 Minimum number of steps for a knight to reach (n,n) on an infinite chessboard. 2
0, 2, 4, 2, 4, 4, 4, 6, 6, 6, 8, 8, 8, 10, 10, 10, 12, 12, 12, 14, 14, 14, 16, 16, 16, 18, 18, 18, 20, 20, 20, 22, 22, 22, 24, 24, 24, 26, 26, 26, 28, 28, 28, 30, 30, 30, 32, 32, 32, 34, 34, 34, 36, 36, 36, 38, 38, 38, 40, 40, 40, 42, 42, 42, 44, 44, 44 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,2
COMMENTS
Apparently also the minimum number of steps of the (1,3)-leaper to reach (2n,0) starting at (0,0). The (1,3)-leaper cannot reach (2n+1,0). - R. J. Mathar, Jan 05 2018
LINKS
FORMULA
a(n) = 2*ceiling(n/3) = 2*A002264(n+2), n >= 3.
G.f.: 2*x*(x^5-x^4-x^2+x+1)/((x-1)^2*(x^2+x+1)). - Colin Barker, Oct 04 2012
MATHEMATICA
Join[{0, 2, 4}, Table[2*Ceiling[n/3], {n, 3, 70}]] (* Harvey P. Dale, Jul 27 2012 *)
CoefficientList[Series[2 x (x^5 - x^4 - x^2 + x + 1)/((x - 1)^2 (x^2 + x + 1)), {x, 0, 100}], x] (* Vincenzo Librandi, Oct 16 2013 *)
LinearRecurrence[{1, 0, 1, -1}, {0, 2, 4, 2, 4, 4, 4}, 70] (* Harvey P. Dale, Nov 03 2019 *)
PROG
(Magma) [0, 2, 4] cat [2*Ceiling(n/3): n in [3..80]]; // Vincenzo Librandi, Oct 16 2013
(PARI) a(n)=if(n>2, (n+2)\3*2, 2*n) \\ Charles R Greathouse IV, Feb 10 2017
CROSSREFS
Sequence in context: A143235 A069465 A047947 * A116982 A216621 A300448
KEYWORD
nonn,easy,nice
AUTHOR
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 10:41 EDT 2024. Contains 371967 sequences. (Running on oeis4.)