A001082 Generalized octagonal numbers: k*(3*k-2), k=0, +- 1, +- 2, +-3, ...
0, 1, 5, 8, 16, 21, 33, 40, 56, 65, 85, 96, 120, 133, 161, 176, 208, 225, 261, 280, 320, 341, 385, 408, 456, 481, 533, 560, 616, 645, 705, 736, 800, 833, 901, 936, 1008, 1045, 1121, 1160, 1240, 1281, 1365, 1408, 1496, 1541, 1633, 1680, 1776, 1825, 1925, 1976
Offset: 1
Examples
For the ninth comment: 65 is in the sequence because 65 = 13*(13+2)/3 or also 65 = -15*(-15+2)/3. - _Bruno Berselli_, Jul 18 2016
Links
- T. D. Noe, Table of n, a(n) for n = 1..1000
- George E. Andrews, Euler's Pentagonal Number Theorem, Mathematics Magazine, Vol. 56, No. 5 (Nov., 1983), pp. 279-284.
- Sandy H. L. Chen, Symmetric Identities from an Invariant in Partition Conjugation and Their Applications in q-Series, Open Journal of Discrete Mathematics, Vol.4, No.2, April 2014.
- John Elias, Illustration of initial terms: Hourglass Octagonals.
- John Elias, Illustration: Pentagonal-Octagonal Star Configurations
- Ralf Stephan, On the solutions to 'px+1 is square'.
- Zhi-Wei Sun, A result similar to Lagrange's theorem, arXiv preprint arXiv:1503.03743 [math.NT], 2015.
- Eric Weisstein's World of Mathematics, Quintuple Product Identity.
- Index entries for linear recurrences with constant coefficients, signature (1,2,-2,-1,1).
Crossrefs
Partial sums of A022998.
Sequences of generalized k-gonal numbers: A001318 (k=5), A000217 (k=6), A085787 (k=7), this sequence (k=8), A118277 (k=9), A074377 (k=10), A195160 (k=11), A195162 (k=12), A195313 (k=13), A195818 (k=14), A277082 (k=15), A274978 (k=16), A303305 (k=17), A274979 (k=18), A303813 (k=19), A218864 (k=20), A303298 (k=21), A303299 (k=22), A303303 (k=23), A303814 (k=24), A303304 (k=25), A316724 (k=26), A316725 (k=27), A303812 (k=28), A303815 (k=29), A316729 (k=30).
Cf. sequences of the form m*(m+k)/(k+1) listed in A274978. [Bruno Berselli, Jul 25 2016]
Programs
-
Haskell
a001082 n = a001082_list !! n a001082_list = scanl (+) 0 $ tail a022998_list -- Reinhard Zumkeller, Mar 31 2012
-
Magma
[n^2 - n - Floor(n/2)^2 : n in [1..50]]; // Wesley Ivan Hurt, Sep 14 2014
-
Maple
seq(n*(n-1)-floor(n/2)^2, n=1..51); # Gary Detlefs, Feb 23 2010
-
Mathematica
Table[If[EvenQ[n], n*(3*n-4)/4, (n-1) (3*n+1)/4], {n, 100}] LinearRecurrence[{1,2,-2,-1,1},{0,1,5,8,16},60] (* Harvey P. Dale, Feb 03 2024 *)
-
PARI
{a(n) = if( n%2, (n-1) * (3*n + 1) / 4, n * (3*n - 4) / 4)};
Formula
a(n) = n*(3*n-4)/4 if n even, (n-1)*(3*n+1)/4 if n odd.
a(n) = n^2 - n - floor(n/2)^2.
G.f.: Sum_{n>=0} (-1)^n*[x^(a(2n+1)) + x^(a(2n+2))] = 1/1 - (x-x^2)/1 - (x^2-x^4)/1 - (x^3-x^6)/1 - ... - (x^k - x^(2k))/1 - ... (continued fraction where k=1..inf). - Paul D. Hanna, Aug 16 2002
a(n+1) = ceiling(n/2)^2 + A046092(floor(n/2)).
O.g.f.: -x^2*(x^2+4*x+1)/((x-1)^3*(1+x)^2). - R. J. Mathar, Apr 15 2008
a(n) = n^2+n-ceiling(n/2)^2 with offset 0 and a(0)=0. - Gary Detlefs, Feb 23 2010
a(n) = (6*n^2-6*n-1-(2*n-1)*(-1)^n)/8. - Luce ETIENNE, Dec 11 2014
E.g.f.: (3*x^2*exp(x) + x*exp(-x) - sinh(x))/4. - Ilya Gutkovskiy, Jul 15 2016
Sum_{n>=2} 1/a(n) = (9 + 2*sqrt(3)*Pi)/12. - Vaclav Kotesovec, Oct 05 2016
Sum_{n>=2} (-1)^n/a(n) = 3*log(3)/2 - 3/4. - Amiram Eldar, Feb 28 2022
Extensions
New sequence name from Matthew Vandermast, Apr 10 2003
Editorial changes by N. J. A. Sloane, Feb 03 2012
Edited by Omar E. Pol, Jun 09 2012
Comments