This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A290166 #24 Sep 06 2017 04:07:59 %S A290166 1,13,684,73980,13376448,3627115200,1376014521600,695592156268800, %T A290166 451867517982720000,366777996951376281600,363753784968105369600000, %U A290166 432795572570448228556800000,608442975450529801872998400000,997771862620790990336507904000000 %N A290166 Number of complete non-collateral matches with lattice points on the edges of an n X n square. %C A290166 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 %H A290166 César Eliud Lozada, <a href="/A290166/a290166_1.pdf">Complete matches</a> %e A290166 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. %o A290166 (PARI) \\ s is without corners and left:m-a, right:m-b, top:m-c, bottom:m-d. %o A290166 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)!))} %o A290166 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 %Y A290166 Cf. A139267 (number of distinct matches), A290167. %K A290166 nonn %O A290166 1,2 %A A290166 _César Eliud Lozada_, Jul 22 2017 %E A290166 a(5)-a(14) from _Andrew Howroyd_, Sep 05 2017