login
a(n) = (n^7 - n)/6.
3

%I #28 Jun 30 2026 20:50:03

%S 0,0,21,364,2730,13020,46655,137256,349524,797160,1666665,3247860,

%T 5971966,10458084,17568915,28476560,44739240,68389776,102036669,

%U 148978620,213333330,300181420,415726311,567470904,764411900,1017252600

%N a(n) = (n^7 - n)/6.

%C Also integer sequences for (n^2-n)/1 (A002378 offset), (n^3-n)/2 (A027480 offset), (n^43-n)/42 (A108496) and (n^1807-n)/1806.

%H Vincenzo Librandi, <a href="/A108495/b108495.txt">Table of n, a(n) for n = 0..1000</a>

%H D. Zagier, <a href="https://mathshistory.st-andrews.ac.uk/EMS/Zagier/Problems/">Problems posed at the St Andrews Colloquium, 1996</a>.

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

%F a(n) = (n-1)*A059721(n) = -A024004(n)*n/6.

%F G.f.: 7*x^2*(3 + 28*x + 58*x^2 + 28*x^3 + 3*x^4)/(1-x)^8. [_Colin Barker_, May 08 2012]

%e a(2) = (2^7 - 2)/6 = 126/6 = 21.

%t Table[(n^7-n)/6,{n,0,30}] (* _Harvey P. Dale_, Apr 16 2014 *)

%t (* Alternative: *)

%t LinearRecurrence[ {8,-28,56,-70,56,-28,8,-1},{0,0,21,364,2730,13020,46655,137256},30] (* _Harvey P. Dale_, Apr 16 2014 *)

%o (Magma) [(n^7-n)/6: n in [0..40]]; // _Vincenzo Librandi_, May 02 2011

%o (Python) [(n**7-n)//6 for n in range(41)] # _David Radcliffe_, Jun 06 2025

%Y Cf. A014117, A108497, A108499.

%K nonn,easy

%O 0,3

%A _Henry Bottomley_, Jun 06 2005