login
If n mod 2 = 0 then a(n) = n^4/4 - 2*n^2 + 3*n; otherwise, a(n) = n^4/4 - 2*n^2 + 3*n - 5/4.
2

%I #29 Dec 29 2024 17:29:05

%S 0,0,2,10,44,120,270,522,920,1504,2330,3450,4932,6840,9254,12250,

%T 15920,20352,25650,31914,39260,47800,57662,68970,81864,96480,112970,

%U 131482,152180,175224,200790,229050,260192,294400,331874,372810,417420,465912,518510,575434

%N If n mod 2 = 0 then a(n) = n^4/4 - 2*n^2 + 3*n; otherwise, a(n) = n^4/4 - 2*n^2 + 3*n - 5/4.

%H Harry J. Smith, <a href="/A064835/b064835.txt">Table of n, a(n) for n = 0..1000</a>

%H G. L. Cohen and E. Tonkes, <a href="https://doi.org/10.37236/1603">Dartboard arrangements</a>, Elect. J. Combin., 8 (No. 2, 2001), #R4.

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

%F G.f.: 2*x^2*(1+x+7*x^2-3*x^3)/((1-x)^5*(1+x)). - _Colin Barker_, Apr 20 2012

%F a(n) = 4*a(n-1) - 5*a(n-2) + 5*a(n-4) - 4*a(n-5) + a(n-6). - _Vincenzo Librandi_, Jun 19 2018

%t Table[If[EvenQ[n],n^4/4-2n^2+3n,n^4/4-2n^2+3n-5/4],{n,0,40}] (* _Harvey P. Dale_, Dec 02 2014 *)

%t LinearRecurrence[{4, -5, 0, 5, -4, 1}, {0, 0, 2, 10, 44, 120}, 40] (* _Vincenzo Librandi_, Jun 19 2018 *)

%o (PARI) a(n) = { (n^4/4 - 2*n^2 + 3*n) - if (n%2, 5/4, 0) } \\ _Harry J. Smith_, Sep 28 2009

%o (PARI) a(n) = n^4\4 - 2*n^2 + 3*n - n%2 \\ _Charles R Greathouse IV_, Dec 29 2024

%o (Magma) I:=[0,0,2,10,44,120]; [n le 6 select I[n] else 4*Self(n-1) - 5*Self(n-2) + 5*Self(n-4) - 4*Self(n-5) + Self(n-6): n in [1..40]]; // _Vincenzo Librandi_, Jun 19 2018

%Y Cf. A064836.

%K nonn,easy

%O 0,3

%A _N. J. A. Sloane_, Oct 25 2001