login
a(n) = n*(n-1)*(n-2)^2.
7

%I #29 Jan 15 2023 02:42:21

%S 0,6,48,180,480,1050,2016,3528,5760,8910,13200,18876,26208,35490,

%T 47040,61200,78336,98838,123120,151620,184800,223146,267168,317400,

%U 374400,438750,511056,591948,682080,782130,892800,1014816,1148928,1295910,1456560,1631700,1822176

%N a(n) = n*(n-1)*(n-2)^2.

%H Vincenzo Librandi, <a href="/A047927/b047927.txt">Table of n, a(n) for n = 2..1000</a>

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

%F From _R. J. Mathar_, May 01 2014: (Start)

%F G.f.: -6*x^3*(1+3*x) / (x-1)^5.

%F a(n) = 6*A002417(n-2). (End)

%F a(n) = A245334(n,3), n > 2. - _Reinhard Zumkeller_, Aug 31 2014

%F From _Amiram Eldar_, Jan 15 2023: (Start)

%F Sum_{n>=3} 1/a(n) = Pi^2/12 - 5/8.

%F Sum_{n>=3} (-1)^(n+1)/a(n) = Pi^2/24 - 2*log(2) + 9/8. (End)

%t a[n_] := n*(n-1)*(n-2)^2; Array[a, 50, 2] (* _Amiram Eldar_, Jan 15 2023 *)

%o (Magma) [n*(n-1)*(n-2)^2: n in [2..40]]; // _Vincenzo Librandi_, May 02 2011

%o (Haskell)

%o a047927 n = if n == 2 then 0 else a245334 n 3

%o -- _Reinhard Zumkeller_, Aug 31 2014

%o (PARI) a(n)=n*(n-1)*(n-2)^2 \\ _Charles R Greathouse IV_, Oct 07 2015

%Y Cf. A002417, A059238, A245334.

%K nonn,easy

%O 2,2

%A _N. J. A. Sloane_

%E Offset changed from 0 to 2 by _Vincenzo Librandi_, May 02 2011