OFFSET
0,2
REFERENCES
M. Petkovic, Mathematics and Chess, Dover Publications (2003), Problem 3.11.
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..1000
Mordechai Katzman, Knight's moves on an infinite board
Mordechai Katzman, Counting monomials, arXiv:math/0504113 [math.AC], 2005.
Index entries for linear recurrences with constant coefficients, signature (3,-3,1).
FORMULA
a(n) = -3 + 4*n + 7*n^2 + 4*sign((n-2)*(n-1)).
G.f.: (1 + 5*x + 12*x^2 - 8*x^4 + 4*x^5)/(1 - x)^3.
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3). - Vincenzo Librandi, Jul 09 2012
For n >= 3, a(n) = A005892(n).
E.g.f.: exp(x)*(1 + 11*x + 7*x^2) - 2*x*(x + 2). - Stefano Spezia, Jul 27 2022
EXAMPLE
a(2)=33 because knight in 2 moves from square (0,0) can reach one of the following squares: {{0,0}, {-4,-2}, {-4,0}, {-4,2}, {-3,-3}, {-3,-1}, {-3,1}, {-3,3}, {-2,-4}, {-2,0}, {-2,4}, {-1,-3}, {-1,-1}, {-1,1}, {-1,3}, {0,-4}, {0,-2}, {0,2}, {0,4}, {1,-3}, {1,-1}, {1,1}, {1,3}, {2,-4}, {2,0}, {2,4}, {3,-3}, {3,-1}, {3,1}, {3,3}, {4,-2}, {4,0}, {4,2}}.
MATHEMATICA
Table[ -3 + 4*n + 7*n^2 + 4*Sign[(n - 2)(n - 1)], {n, 0, 100}]
CoefficientList[Series[(1+5*x+12*x^2-8*x^4+4*x^5)/(1-x)^3, {x, 0, 50}], x] (* Vincenzo Librandi, Jul 09 2012 *)
Join[{1, 8, 33}, LinearRecurrence[{3, -3, 1}, {76, 129, 196}, 50]] (* Harvey P. Dale, Dec 05 2014 *)
PROG
(Magma) I:=[1, 8, 33, 76, 129, 196, 277]; [n le 7 select I[n] else 3*Self(n-1)-3*Self(n-2)+Self(n-3): n in [1..50]]: // Vincenzo Librandi, Jul 09 2012
(PARI) a(n)=7*n^2 + 4*n - 3 + 4*sign((n-2)*(n-1)) \\ Charles R Greathouse IV, Feb 09 2017
CROSSREFS
KEYWORD
easy,nice,nonn
AUTHOR
Anton Chupin (chupin(AT)icmm.ru), May 14 2006
EXTENSIONS
Link updated by Tristan Miller, Jun 13 2013
STATUS
approved