login
Number of (w,x,y) with all terms in {0,...,n} and w != x and x > range(w,x,y).
3

%I #28 Jun 07 2023 09:45:40

%S 0,0,2,10,26,56,100,166,252,368,510,690,902,1160,1456,1806,2200,2656,

%T 3162,3738,4370,5080,5852,6710,7636,8656,9750,10946,12222,13608,15080,

%U 16670,18352,20160,22066,24106,26250,28536,30932,33478,36140

%N Number of (w,x,y) with all terms in {0,...,n} and w != x and x > range(w,x,y).

%C For a guide to related sequences, see A212959.

%H <a href="/index/Rec#order_06">Index entries for linear recurrences with constant coefficients</a>, signature (2,1,-4,1,2,-1).

%F a(n) = (n-1)*(2*n*(7*n-2) - 3*(-1)^n + 3)/24.

%F a(n) = 2*a(n-1) + a(n-2) - 4*a(n-3) + a(n-4) + 2*a(n-5) - a(n-6).

%F G.f.: f(x)/g(x), where f(x) = 2*(x^2)*(1 + 3*x + 2*x^2 + x^3) and g(x) = ((1-x)^4)*(1+x)^2.

%F a(n) = A045991(n) - A212970(n-1). - _Ayoub Saber Rguez_, Mar 31 2023

%t t = Compile[{{n, _Integer}}, Module[{s = 0},

%t (Do[If[w != x > (Max[w, x, y] - Min[w, x, y]),

%t s = s + 1],

%t {w, 0, n}, {x, 0, n}, {y, 0, n}]; s)]];

%t m = Map[t[#] &, Range[0, 60]] (* A212969 *)

%t m/2 (* integers *)

%Y Cf. A212959, A045991, A212970.

%K nonn,easy

%O 0,3

%A _Clark Kimberling_, Jun 02 2012