%I #29 Apr 03 2023 21:47:29
%S 0,0,17,78,234,520,1035,1806,2996,4608,6885,9790,13662,18408,24479,
%T 31710,40680,51136,63801,78318,95570,115080,137907,163438,192924,
%U 225600,262925,303966,350406,401128,458055,519870,588752,663168,745569,834190,931770,1036296,1150811,1273038
%N 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.
%C 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.
%H Andrew Howroyd, <a href="/A357740/b357740.txt">Table of n, a(n) for n = 1..1000</a>
%H <a href="/index/Rec#order_08">Index entries for linear recurrences with constant coefficients</a>, signature (2,2,-6,0,6,-2,-2,1).
%F 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;
%F 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);
%F 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);
%F a(n) = (n-2)*(n-1)*((n+3)*n - 2 + (n mod 2))/2.
%F 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
%F 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.
%e For n=3, the a(3)=17 solutions are
%e | | K| | | K|k |k |k K| K |K |K | K |k |k | k | k |
%e | K| |k |k K|k | | K| | | | | | | | | |
%e k K|k |k | K| | | K| | |k |k | k | k | K |K |K | K |
%o (Python) a=(lambda n: (n-2)*(n-1)*((n+3)*n-2+n%2)//2)
%o (PARI) a(n) = {(n-2)*(n-1)*((n+3)*n - 2 + (n % 2))/2} \\ _Andrew Howroyd_, Dec 31 2022
%Y Cf. A035286 (no symmetry), A357723 (8-fold symmetry).
%K nonn,easy
%O 1,3
%A _Nathan L. Skirrow_, Oct 11 2022