%I #23 Sep 08 2022 08:45:16
%S 0,1,8,39,124,305,636,1183,2024,3249,4960,7271,10308,14209,19124,
%T 25215,32656,41633,52344,64999,79820,97041,116908,139679,165624,
%U 195025,228176,265383,306964,353249,404580,461311,523808,592449,667624,749735,839196
%N a(n) = n*(n^3 - n + 2)/2.
%D T. A. Gulliver, Sequences from Cubes of Integers, Int. Math. Journal, 4 (2003), 439-445.
%H Vincenzo Librandi, <a href="/A101374/b101374.txt">Table of n, a(n) for n = 0..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 a(n) = 5*a(n-1) - 10*a(n-2) + 10*a(n-3) - 5*a(n-4) + a(n-5) for n>4. - _Harvey P. Dale_, Sep 28 2012
%e From _Bruno Berselli_, Oct 30 2017: (Start)
%e After 0:
%e 1 = -(0) + (1);
%e 8 = -(0 + 1) + (2 + 3 + 2^2);
%e 39 = -(0 + 1 + 2) + (3 + 4 + 5 + 6 + 7 + 8 + 3^2);
%e 124 = -(0 + 1 + 2 + 3) + (4 + 5 + 6 + 7 + ... + 15 + 4^2);
%e 305 = -(0 + 1 + 2 + 3 + 4) + (5 + 6 + 7 + 8 + ... + 24 + 5^2);
%e 636 = -(0 + 1 + 2 + 3 + 4 + 5) + (6 + 7 + 8 + 9 + ... + 35 + 6^2), etc. (End)
%t Table[n (n^3 - n + 2)/2, {n, 0, 50}] (* or *) LinearRecurrence[{5, -10, 10, -5, 1}, {0, 1, 8, 39, 124}, 50] (* _Harvey P. Dale_, Sep 28 2012 *)
%o (Magma) [n*(n^3-n+2)/2: n in [0..40]]; // _Vincenzo Librandi_, May 26 2011
%K nonn,easy
%O 0,3
%A _N. J. A. Sloane_, Jan 15 2005