cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A152016 a(n) = n^4 - n^3 - n^2 - n.

Original entry on oeis.org

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

Views

Author

Keywords

Programs

  • 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 *)
  • Python
    def A152016(n): return n*(n*(n*(n-1)-1)-1) # Chai Wah Wu, Apr 13 2024

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)

Extensions

Offset changed by Bruno Berselli, Jul 27 2012