login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A014637
Odd heptagonal numbers (A000566).
4
1, 7, 55, 81, 189, 235, 403, 469, 697, 783, 1071, 1177, 1525, 1651, 2059, 2205, 2673, 2839, 3367, 3553, 4141, 4347, 4995, 5221, 5929, 6175, 6943, 7209, 8037, 8323, 9211, 9517, 10465, 10791, 11799, 12145, 13213, 13579, 14707, 15093, 16281, 16687, 17935
OFFSET
0,2
FORMULA
G.f.:(1+13*x^4+14*x^3+46*x^2+6*x)/((1+x)^2*(1-x)^3) [From Maksym Voznyy (voznyy(AT)mail.ru), Aug 11 2009]
From Ant King, Sep 01 2011: (Start)
a(n) = (1/8)*(1+(-1)^n+4*n)*(-1+5*(-1)^n+20*n)
a(n) = a(n-1)+2*a(n-2)-2*a(n-3)-a(n-4)+a(n-5)
a(n) = 80+2*a(n-2)-a(n-4)
(End)
MATHEMATICA
Table[1/8 (1+(-1)^n+4 n) (-1+5 (-1)^n+20 n), {n, 0, 42}] (* Ant King, Sep 01 2011 *)
Select[PolygonalNumber[7, Range[200]], OddQ] (* or *) LinearRecurrence[{1, 2, -2, -1, 1}, {1, 7, 55, 81, 189}, 50] (* Harvey P. Dale, Sep 14 2022 *)
PROG
(PARI) a(n)=(5*(-1)^n+20*n-1)*(4*n+1+(-1)^n)/8 \\ Charles R Greathouse IV, Sep 01 2011
CROSSREFS
KEYWORD
nonn,easy
EXTENSIONS
Extended and description corrected by Patrick De Geest
STATUS
approved