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.

Showing 1-4 of 4 results.

A000566 Heptagonal numbers (or 7-gonal numbers): n*(5*n-3)/2.

Original entry on oeis.org

0, 1, 7, 18, 34, 55, 81, 112, 148, 189, 235, 286, 342, 403, 469, 540, 616, 697, 783, 874, 970, 1071, 1177, 1288, 1404, 1525, 1651, 1782, 1918, 2059, 2205, 2356, 2512, 2673, 2839, 3010, 3186, 3367, 3553, 3744, 3940, 4141, 4347, 4558, 4774, 4995, 5221, 5452, 5688
Offset: 0

Views

Author

Keywords

Comments

Binomial transform of (0, 1, 5, 0, 0, 0, ...). Binomial transform is A084899. - Paul Barry, Jun 10 2003
Row sums of triangle A131413. - Gary W. Adamson, Jul 08 2007
Sequence starting (1, 7, 18, 34, ...) = binomial transform of (1, 6, 5, 0, 0, 0, ...). Also row sums of triangle A131896. - Gary W. Adamson, Jul 24 2007
Also the partial sums of A016861, a zero added in front; therefore a(n) = n (mod 5). - R. J. Mathar, Mar 19 2008
Also sequence found by reading the line from 0, in the direction 0, 7, ..., and the line from 1, in the direction 1, 18, ..., in the square spiral whose edges have length A195013 and whose vertices are the numbers A195014. These parallel lines are the semi-axes perpendicular to the main axis A195015 in the same spiral. - Omar E. Pol, Oct 14 2011
Also sequence found by reading the line from 0, in the direction 0, 7, ... and the parallel line from 1, in the direction 1, 18, ..., in the square spiral whose vertices are the generalized heptagonal numbers A085787. - Omar E. Pol, Jul 18 2012
Partial sums give A002413. - Omar E. Pol, Jan 12 2013
The n-th heptagonal number equals the sum of the n consecutive integers starting at 2*n-1; for example, 1, 3+4, 5+6+7, 7+8+9+10, etc. In general, the n-th (2k+1)-gonal number is the sum of the n consecutive integers starting at (k-1)*n - (k-2). When k = 1 and 2, this result generates the triangular numbers, A000217, and the pentagonal numbers, A000326, respectively. - Charlie Marion, Mar 02 2022

Examples

			G.f. = x + 7*x^2 + 18*x^3 + 34*x^4 + 55*x^5 + 81*x^6 + 112*x^7 + ... - _Michael Somos_, Jan 25 2019
		

References

  • Albert H. Beiler, Recreations in the Theory of Numbers, Dover, NY, 1964, p. 189.
  • John H. Conway and Richard K. Guy, The Book of Numbers, New York: Springer-Verlag, 1996. See p. 38.
  • E. Deza and M. M. Deza, Figurate numbers, World Scientific Publishing (2012), page 6.
  • Leonard E. Dickson, History of the Theory of Numbers. Carnegie Institute Public. 256, Washington, DC, Vol. 1, 1919; Vol. 2, 1920; Vol. 3, 1923, see vol. 2, p. 2.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • David Wells, The Penguin Dictionary of Curious and Interesting Numbers. Penguin Books, NY, 1986, Revised edition 1987. See p. 123.

Crossrefs

a(n)= A093562(n+1, 2), (5, 1)-Pascal column.
Cf. sequences listed in A254963.

Programs

  • Haskell
    a000566 n = n * (5 * (n - 1) + 2) `div` 2
    a000566_list = scanl (+) 0 a016861_list  -- Reinhard Zumkeller, Jun 16 2013
    
  • Magma
    a000566:=func< n | n*(5*n-3) div 2 >; [ a000566(n): n in [0..50] ];
    
  • Maple
    A000566 := proc(n)
            n*(5*n-3)/2 ;
    end proc:
    seq(A000566(n),n=0..30); # R. J. Mathar, Oct 02 2020
  • Mathematica
    Table[n (5n - 3)/2, {n, 0, 50}] (* or *) LinearRecurrence[{3, -3, 1}, {0, 1, 7}, 50] (* Harvey P. Dale, Oct 13 2011 *)
    Join[{0},Accumulate[Range[1,315,5]]] (* Harvey P. Dale, Mar 26 2016 *)
    (* For Mathematica 10.4+ *) Table[PolygonalNumber[RegularPolygon[7], n], {n, 0, 48}] (* Arkadiusz Wesolowski, Aug 27 2016 *)
    PolygonalNumber[7,Range[0,50]] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Jan 23 2021 *)
  • Maxima
    makelist(n*(5*n-3)/2, n, 0, 20); /* Martin Ettl, Dec 11 2012 */
    
  • PARI
    a(n) = n * (5*n - 3) / 2
    
  • Python
    # Intended to compute the initial segment of the sequence, not isolated terms.
    def aList():
         x, y = 1, 1
         yield 0
         while True:
             yield x
             x, y = x + y + 5, y + 5
    A000566 = aList()
    print([next(A000566) for i in range(49)]) # Peter Luschny, Aug 04 2019
    
  • Python
    [n*(5*n-3)//2 for n in range(50)] # Gennady Eremin, Mar 24 2022

Formula

G.f.: x*(1 + 4*x)/(1 - x)^3. Simon Plouffe in his 1992 dissertation.
a(n) = C(n, 1) + 5*C(n, 2). - Paul Barry, Jun 10 2003
a(n) = Sum_{k = 1..n} (4*n - 3*k). - Paul Barry, Sep 06 2005
a(n) = n + 5*A000217(n-1) - Floor van Lamoen, Oct 14 2005
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3) for a(0) = 0, a(1) = 1, a(2) = 7. - Jaume Oliver Lafont, Dec 02 2008
a(n+1) = A153126(n) + n mod 2; a(2*n+1) = A033571(n); a(2*(n+1)) = A153127(n) + 1. - Reinhard Zumkeller, Dec 20 2008
40*a(n)+ 9 = A017354(n-1). - Ken Rosenbaum, Dec 02 2009.
a(n) = 2*a(n-1) - a(n-2) + 5, with a(0) = 0 and a(1) = 1. - Mohamed Bouhamida, May 05 2010
a(n) = A000217(n) + 4*A000217(n-1). - Vincenzo Librandi, Nov 20 2010
a(n) = a(n-1) + 5*n - 4, with a(0) = 0. - Vincenzo Librandi, Nov 20 2010
a(n) = A130520(5*n). - Philippe Deléham, Mar 26 2013
a(5*a(n) + 11*n + 1) = a(5*a(n) + 11*n) + a(5*n + 1). - Vladimir Shevelev, Jan 24 2014
Sum_{n>=1} 1/a(n) = sqrt(1 - 2/sqrt(5))*Pi/3 + 5*log(5)/6 - sqrt(5)*log((1 + sqrt(5))/2)/3 = 1.32277925312238885674944226131... . See A244639. - Vaclav Kotesovec, Apr 27 2016
E.g.f.: x*(2 + 5*x)*exp(x)/2. - Ilya Gutkovskiy, Aug 27 2016
From Charlie Marion, May 02 2017: (Start)
a(n+m) = a(n) + 5*n*m + a(m);
a(n-m) = a(n) - 5*n*m + a(m) + 3*m;
a(n) - a(m) = (5*(n + m) - 3)*(n - m)/2.
In general, let P(k,n) be the n-th k-gonal number. Then
P(k,n+m) = P(k,n) + (k - 2)*n*m + P(k,m);
P(k,n-m) = P(k,n) - (k - 2)*n*m + P(k,m) + (k - 4)*m;
P(k,n) - P(k,m) = ((k-2)*(n + m) + 4 - k)*(n - m)/2.
(End)
a(n) = A147875(-n) for all n in Z. - Michael Somos, Jan 25 2019
a(n) = A000217(n-1) + A000217(2*n-1). - Charlie Marion, Dec 19 2019
Product_{n>=2} (1 - 1/a(n)) = 5/7. - Amiram Eldar, Jan 21 2021
a(n) + a(n+1) = (2*n+1)^2 + n^2 - 2*n. In general, if we let P(k,n) = the n-th k-gonal number, then P(k^2-k+1,n)+ P(k^2-k+1,n+1) = ((k-1)*n+1)^2 + (k-2)*(n^2-2*n) = ((k-1)*n+1)^2 + (k-2)*A005563(n-2). When k = 2, this formula reduces to the well-known triangular number formula: T(n) + T(n+1) = (n+1)^2. - Charlie Marion, Jul 01 2021

Extensions

Partially edited by Joerg Arndt, Mar 11 2010

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

A014773 Squares of odd heptagonal numbers.

Original entry on oeis.org

1, 49, 3025, 6561, 35721, 55225, 162409, 219961, 485809, 613089, 1147041, 1385329, 2325625, 2725801, 4239481, 4862025, 7144929, 8059921, 11336689, 12623809, 17147881, 18896409, 24950025, 27258841, 35153041, 38130625, 48205249, 51969681, 64593369, 69272329
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    Table[SeriesCoefficient[x (1 + 48 x + 2972 x^2 + 3344 x^3 + 17262 x^4 + 5648 x^5 + 8396 x^6 + 560 x^7 + 169 x^8)/((1 - x)^5 (1 + x)^4), {x, 0, n}], {n, 30}] (* Michael De Vlieger, Dec 17 2015 *)
  • PARI
    Vec(x*(1+48*x+2972*x^2+3344*x^3+17262*x^4+5648*x^5+8396*x^6+560*x^7+169*x^8) / ((1-x)^5*(1+x)^4) + O(x^40)) \\ Colin Barker, Dec 17 2015

Formula

From Colin Barker, Dec 17 2015: (Start)
a(n) = 1/2*(200*n^4-920*n^3+1578*n^2-1196*n+338) for n even.
a(n) = 1/2*(200*n^4-520*n^3+498*n^2-208*n+32) for n odd.
G.f.: x*(1+48*x+2972*x^2+3344*x^3+17262*x^4+5648*x^5+8396*x^6+560*x^7+169*x^8) / ((1-x)^5*(1+x)^4).
(End)

Extensions

More terms from Erich Friedman.

A014637 Odd heptagonal numbers (A000566).

Original entry on oeis.org

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

Views

Author

Keywords

Crossrefs

Programs

  • 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 *)
  • PARI
    a(n)=(5*(-1)^n+20*n-1)*(4*n+1+(-1)^n)/8 \\ Charles R Greathouse IV, Sep 01 2011

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)

Extensions

Extended and description corrected by Patrick De Geest
Showing 1-4 of 4 results.