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
Vincenzo Librandi, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (1,0,1,-1).
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
KEYWORD
nonn,easy,nice
AUTHOR
STATUS
approved