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.

A014640 Even heptagonal numbers (A000566).

Original entry on oeis.org

0, 18, 34, 112, 148, 286, 342, 540, 616, 874, 970, 1288, 1404, 1782, 1918, 2356, 2512, 3010, 3186, 3744, 3940, 4558, 4774, 5452, 5688, 6426, 6682, 7480, 7756, 8614, 8910, 9828, 10144, 11122, 11458, 12496, 12852, 13950, 14326, 15484, 15880, 17098, 17514, 18792
Offset: 0

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    Select[Table[(n(5n-3))/2,{n,0,100}],EvenQ] (* or *) LinearRecurrence[ {1,2,-2,-1,1},{0,18,34,112,148},50] (* Harvey P. Dale, Jun 16 2014 *)
  • PARI
    concat(0, Vec(2*x*(9+8*x+21*x^2+2*x^3)/((1-x)^3*(1+x)^2) + O(x^100))) \\ Colin Barker, Jan 27 2016

Formula

G.f.: -2*x*(2*x^3+21*x^2+8*x+9) / ((x+1)^2*(x-1)^3) [From Maksym Voznyy (voznyy(AT)mail.ru), Aug 11 2009]
a(0)=0, a(1)=18, a(2)=34, a(3)=112, a(4)=148, a(n) = a(n-1)+2*a(n-2)-2*a(n-3)-a(n-4)+a(n-5). - Harvey P. Dale, Jun 16 2014
From Colin Barker, Jan 27 2016: (Start)
a(n) = (20*n^2-10*(-1)^n*n+4*n-(-1)^n+1)/2.
a(n) = 10*n^2-3*n for n even.
a(n) = 10*n^2+7*n+1 for n odd.
(End)

Extensions

Extended and description corrected by Patrick De Geest