login
A290166
Number of complete non-collateral matches with lattice points on the edges of an n X n square.
2
1, 13, 684, 73980, 13376448, 3627115200, 1376014521600, 695592156268800, 451867517982720000, 366777996951376281600, 363753784968105369600000, 432795572570448228556800000, 608442975450529801872998400000, 997771862620790990336507904000000
OFFSET
1,2
COMMENTS
It appears that an n X n square here refers to a square array of points with n+1 points along each side, so that there are n edges on each side. - N. J. A. Sloane, Aug 22 2017
LINKS
EXAMPLE
Points on the sides of a 2 X 2 square can be matched in 13 different ways, if matching two points on the same side is not allowed. Therefore a(2)=13.
PROG
(PARI) \\ s is without corners and left:m-a, right:m-b, top:m-c, bottom:m-d.
s(m, a, b, c, d) = {sum(k=0, m, my(j = k+(a+b-c-d)/2); if(j<0||k<0||2*(m-k)<a+b, 0, binomial(m-a, k) * binomial(m-b, k) * binomial(m-c, j) * binomial(m-d, j) * k! * j! * (2*m-2*k-a-b)!))}
a(n)={my(m=n-1); 8*m^3*(m-1)*s(m, 2, 1, 1, 0) + 4*m^3*(m-1)*s(m, 2, 0, 1, 1) + 2*m^2*(m-1)^2*s(m, 2, 2, 0, 0) + 2*m^4*s(m, 1, 1, 1, 1) + 6*m^2*s(m, 1, 0, 1, 0) + 2*m^2*s(m, 1, 1, 0, 0) + s(m, 0, 0, 0, 0); } \\ Andrew Howroyd, Sep 05 2017
CROSSREFS
Cf. A139267 (number of distinct matches), A290167.
Sequence in context: A042307 A012746 A211094 * A113093 A195576 A195555
KEYWORD
nonn
AUTHOR
César Eliud Lozada, Jul 22 2017
EXTENSIONS
a(5)-a(14) from Andrew Howroyd, Sep 05 2017
STATUS
approved