%I #27 Jan 16 2018 03:15:00
%S 0,1,90,1620,11810,56613,206234,623904,1641654,3882985,8431280,
%T 17078364,32641102,59401153,103638420,174341920,284041304,449881893,
%U 694849380,1049316180,1552766796,2255936441,3223157762,4535226864,6292505300,8618661337,11664674406,15613614884
%N Number of ways to place 4 points on an n X n point grid so that no point is equally distant from two other points on the same row or the same column.
%C Rotations and reflections of a placement are counted.
%C The condition of placements is also known as "no 3-term arithmetic progressions".
%H Heinrich Ludwig, <a href="/A296998/b296998.txt">Table of n, a(n) for n = 1..256</a>
%H <a href="/index/Rec#order_21">Index entries for linear recurrences with constant coefficients</a>, signature (3,-1,-3,1,-3,8,0,-2,-2,-10,10,2,2,0,-8,3,-1,3,1,-3,1).
%F a(n) = binomial(n^2, 4) - (floor((n-1)^2/4)*(n^2-3) - ((5/12)*n^2 - (3/2)*n + 1/3 + (n == 0 mod 3)*(-1/3) + (n == 1 mod 2)*3/4 + (n == 2 mod 4)))*2*n.
%F a(n) = (n^8 -6*n^6 -12*n^5 +35*n^4 +56*n^3 -150*n^2)/24 + b(n), where
%F b(n) = 0 for n == 0 mod 12,
%F b(n) = -n^3/2 +11*n/3 for n == 1, 5, 7, 11 mod 12,
%F b(n) = 8*n/3 for n == 2, 10 mod 12,
%F b(n) = -n^3/2 +3*n for n == 3, 9 mod 12,
%F b(n) = 2*n/3 for n == 4, 8 mod 12,
%F b(n) = 2*n for n == 6 mod 12.
%F Conjectures from _Colin Barker_, Dec 23 2017: (Start)
%F G.f.: x^2*(1 + 87*x + 1351*x^2 + 7043*x^3 + 23072*x^4 + 52978*x^5 + 95887*x^6 + 138345*x^7 + 166488*x^8 + 164998*x^9 + 137795*x^10 + 94181*x^11 + 52940*x^12 + 23010*x^13 + 7601*x^14 + 1647*x^15 + 251*x^16 + 15*x^17 - 10*x^18) / ((1 - x)^9*(1 + x)^4*(1 + x^2)^2*(1 + x + x^2)^2).
%F a(n) = 3*a(n-1) - a(n-2) - 3*a(n-3) + a(n-4) - 3*a(n-5) + 8*a(n-6) - 2*a(n-8) - 2*a(n-9) - 10*a(n-10) + 10*a(n-11) + 2*a(n-12) + 2*a(n-13) - 8*a(n-15) + 3*a(n-16) - a(n-17) + 3*a(n-18) + a(n-19) - 3*a(n-20) + a(n-21) for n>21.
%F (End)
%t Array[Binomial[#^2, 4] - 2 # (Floor[(# - 1)^2/4] (#^2 - 3) - (5 #^2/12 - 3 #/2 + 1/3 - Boole[Divisible[#, 3]]/3 + 3 Boole[OddQ@ #]/4 + Boole[Mod[#, 4] == 2])) &, 28] (* _Michael De Vlieger_, Dec 23 2017 *)
%Y Cf. A296468, A296997.
%K nonn,easy
%O 1,3
%A _Heinrich Ludwig_, Dec 23 2017