OFFSET
1,2
COMMENTS
Board is numbered as follows:
1 2 4 7 11 16 .
3 5 8 12 17 .
6 9 13 18 .
10 14 19 .
15 20 .
21 .
.
LINKS
Daniël Karssen, Table of n, a(n) for n = 1..10000
Daniël Karssen, Figure showing the first 6 steps of the sequence
Index entries for linear recurrences with constant coefficients, signature (1,2,-2,-1,1).
FORMULA
From Colin Barker, Jul 18 2018: (Start)
G.f.: x*(1 + 4*x - 3*x^2 + 2*x^4) / ((1 - x)^3*(1 + x)^2).
a(n) = a(n-1) + 2*a(n-2) - 2*a(n-3) - a(n-4) + a(n-5) for n>5.
a(n) = (n^2 + n + 4)/2 for n even.
a(n) = (n^2 - n + 2)/2 for n odd.
(End)
MATHEMATICA
CoefficientList[ Series[-(2x^4 - 3x^2 + 4x + 1)/((x - 1)^3 (x + 1)^2), {x, 0, 52}], x] (* or *)
LinearRecurrence[{1, 2, -2, -1, 1}, {1, 5, 4, 12, 11}, 53] (* Robert G. Wilson v, Jul 18 2018 *)
PROG
(PARI) Vec(x*(1 + 4*x - 3*x^2 + 2*x^4) / ((1 - x)^3*(1 + x)^2) + O(x^40)) \\ Colin Barker, Jul 18 2018
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Daniël Karssen, Jul 15 2018
STATUS
approved