login
A152016
a(n) = n^4 - n^3 - n^2 - n.
3
0, -2, 2, 42, 172, 470, 1038, 2002, 3512, 5742, 8890, 13178, 18852, 26182, 35462, 47010, 61168, 78302, 98802, 123082, 151580, 184758, 223102, 267122, 317352, 374350, 438698, 511002, 591892, 682022, 782070, 892738, 1014752, 1148862
OFFSET
0,2
FORMULA
a(n) = n*(n*(n*(n - 1) - 1) - 1). - Peter M. Chema, Jan 19 2017
From Chai Wah Wu, Mar 16 2017: (Start)
a(n) = 5*a(n-1) - 10*a(n-2) + 10*a(n-3) - 5*a(n-4) + a(n-5) for n > 4.
G.f.: 2*x*(-x^3 - 6*x^2 - 6*x + 1)/(x - 1)^5. (End)
MAPLE
A152016:=n->n^4-n^3-n^2-n: seq(A152016(n), n=0..50); # Wesley Ivan Hurt, Jan 28 2017
MATHEMATICA
lst={}; Do[AppendTo[lst, n^4-n^3-n^2-n], {n, 0, 5!}]; lst
(* Second program: *)
Table[Total@ MapIndexed[(2 Boole[First@ #2 == 1] - 1) n^#1 &, Reverse@ Range@ 4], {n, 0, 33}] (* Michael De Vlieger, Jan 21 2017 *)
PROG
(Python)
def A152016(n): return n*(n*(n*(n-1)-1)-1) # Chai Wah Wu, Apr 13 2024
CROSSREFS
Sequence in context: A215049 A087541 A153434 * A264516 A271845 A348226
KEYWORD
sign,easy
AUTHOR
EXTENSIONS
Offset changed by Bruno Berselli, Jul 27 2012
STATUS
approved