login
A357740
Number of non-equivalent ways under symmetry in one axis that 2 non-attacking kings of different colors can be placed on an n X n board.
2
0, 0, 17, 78, 234, 520, 1035, 1806, 2996, 4608, 6885, 9790, 13662, 18408, 24479, 31710, 40680, 51136, 63801, 78318, 95570, 115080, 137907, 163438, 192924, 225600, 262925, 303966, 350406, 401128, 458055, 519870, 588752, 663168, 745569, 834190, 931770, 1036296, 1150811, 1273038
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.
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
Cf. A035286 (no symmetry), A357723 (8-fold symmetry).
Sequence in context: A063494 A146594 A202138 * A124898 A036429 A126404
KEYWORD
nonn,easy
AUTHOR
Nathan L. Skirrow, Oct 11 2022
STATUS
approved