login
Number of ways to place 3 points on a triangular grid of side n so that no three of them are vertices of an equilateral triangle with sides parallel to the grid.
5

%I #22 Sep 08 2022 08:46:08

%S 0,15,107,428,1282,3198,7022,14020,26000,45445,75665,120960,186802,

%T 280028,409052,584088,817392,1123515,1519575,2025540,2664530,3463130,

%U 4451722,5664828,7141472,8925553,11066237,13618360,16642850,20207160,24385720,29260400,34920992

%N Number of ways to place 3 points on a triangular grid of side n so that no three of them are vertices of an equilateral triangle with sides parallel to the grid.

%H Heinrich Ludwig, <a href="/A243212/b243212.txt">Table of n, a(n) for n = 2..1000</a>

%H <a href="/index/Rec#order_08">Index entries for linear recurrences with constant coefficients</a>, signature (6,-14,14,0,-14,14,-6,1).

%F a(n) = C(n*(n+1)/2, 3) - floor((n-1)*(n+1)*(2*n-1)/8).

%F a(n) = C(n*(n+1)/2, 3) - A002717(n-1).

%F a(n) = (-3+3*(-1)^n+20*n+8*n^2-23*n^3-3*n^4+3*n^5+n^6)/48. - _Colin Barker_, Jun 09 2014

%F G.f.: -x^3*(2*x^3-4*x^2+17*x+15) / ((x-1)^7*(x+1)). - _Colin Barker_, Jun 09 2014

%t Table[Binomial[n (n + 1)/2, 3] - Floor[(n - 1) (n + 1) (2 n - 1)/8], {n, 2, 40}] (* _Vincenzo Librandi_, Jun 23 2015 *)

%o (PARI) concat(0, Vec(-x^3*(2*x^3-4*x^2+17*x+15)/((x-1)^7*(x+1)) + O(x^100))) \\ _Colin Barker_, Jun 09 2014

%o (Magma) I:=[0,15,107,428,1282,3198,7022,14020]; [n le 8 select I[n] else 6*Self(n-1)-14*Self(n-2)+14*Self(n-3)-14*Self(n-5)+14*Self(n-6)-6*Self(n-7)+Self(n-8): n in [1..40]]; // _Vincenzo Librandi_, Jun 23 2015

%Y Cf. A243211, A243208, A000217, A050534, A243213, A243214.

%K nonn,easy

%O 2,2

%A _Heinrich Ludwig_, Jun 09 2014