OFFSET
1,3
COMMENTS
The number of king positions over which you iterate when making tablebases of positions containing pawns, wherein it is only equivalent under reflection in the x axis.
LINKS
Andrew Howroyd, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (2,2,-6,0,6,-2,-2,1).
FORMULA
a(n) = n^4/2 - 4*n^2 + (9/2)*n - 1 if n is odd else n^4/2 - (9/2)*n^2 + 6*n - 2;
a(n) = n^4/2 - (17/4)*n^2 + (21/4)*n - 3/2 + (-1)^n*(-(1/4)*n^2 + (3/4)*n - 1/2);
a(n) = 2*a(n-1) + 2*a(n-2) - 6*a(n-3) + 6*a(n-5) - 2*a(n-6) - 2*a(n-7) + a(n-8);
a(n) = (n-2)*(n-1)*((n+3)*n - 2 + (n mod 2))/2.
G.f.: x^3*(17 + 44*x + 44*x^2 - 2*x^3 - 5*x^4 - 2*x^5)/((1 - x)^5*(1 + x)^3). - Andrew Howroyd, Dec 31 2022
E.g.f.: 2+(e^x*(2*x^4 + 12*x^3 - 3*x^2 + 6*x - 6) - e^(-x)*(x^2 + 2*x + 2))/4 = (cosh(x)*(x^4 + 6*x^3 - 2*x^2 + 2*x - 4) + sinh(x)*(x^4 + 6*x^3 - x^2 + 4*x - 2))/2 + 2.
EXAMPLE
For n=3, the a(3)=17 solutions are
| | K| | | K|k |k |k K| K |K |K | K |k |k | k | k |
| K| |k |k K|k | | K| | | | | | | | | |
k K|k |k | K| | | K| | |k |k | k | k | K |K |K | K |
PROG
(Python) a=(lambda n: (n-2)*(n-1)*((n+3)*n-2+n%2)//2)
(PARI) a(n) = {(n-2)*(n-1)*((n+3)*n - 2 + (n % 2))/2} \\ Andrew Howroyd, Dec 31 2022
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Nathan L. Skirrow, Oct 11 2022
STATUS
approved