OFFSET
0,2
COMMENTS
Previous name was: Pentagonal wave sequence of the second kind.
Even-indexed terms are pentagonal numbers with even index in A000326. Odd-indexed terms are second pentagonal numbers with odd index in A005449.
A104584, pentagonal wave sequence of the first kind; switches odd and even applications and vice versa in A104585. The pentagonal wave triangle, A104586, has A104584 in odd columns and A104585 in even columns.
Integer values of (n+1)(2n+1)/3 in order of appearance. - Wesley Ivan Hurt, Sep 17 2013
Exponents of q in the identity 1 - Sum_{n >= 0} ( q^(3*n+2)*Product_{k = 1..n} (1 - q^(4*k-1)) ) = 1 - q^2 - q^5 + q^15 + q^22 - q^40 - q^51 + + - - .... Compare with Euler's pentagonal number theorem: Product_{n >= 1} (1 - q^n) = 1 - Sum_{n >= 1} ( q^n*Product_{k = 1..n-1} (1 - q^k) ) = 1 - q - q^2 + q^5 + q^7 - q^12 - q^15 + + - - .... - Peter Bala, Dec 03 2020
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..1000
Wikipedia, Pentagonal number theorem.
Index entries for linear recurrences with constant coefficients, signature (1,2,-2,-1,1).
FORMULA
a(n) = (1/2) * ( 3*n^2 - n*(-1)^n ). - Ralf Stephan, Nov 13 2010
G.f.: x*(2+3*x+6*x^2+x^3)/(1-x)^3/(1+x)^2. - Colin Barker, Feb 13 2012
a(n) = a(n-1) + 2*a(n-2) - 2*a(n-3) - a(n-4) + a(n-5). - Vincenzo Librandi, Apr 04 2013
From Amiram Eldar, Feb 22 2022: (Start)
Sum_{n>=1} 1/a(n) = 4*log(2) - Pi/sqrt(3).
Sum_{n>=1} (-1)^(n+1)/a(n) = 2*Pi/sqrt(3) - 3*log(3). (End)
EXAMPLE
MATHEMATICA
Table[(1/2) (3 n^2 - n (-1)^n), {n, 0, 100}] (* Vincenzo Librandi, Apr 04 2013 *)
LinearRecurrence[{1, 2, -2, -1, 1}, {0, 2, 5, 15, 22}, 50] (* Harvey P. Dale, Sep 14 2015 *)
PROG
(Magma) I:=[0, 2, 5, 15, 22]; [n le 5 select I[n] else Self(n-1)+2*Self(n-2)-2*Self(n-3)-Self(n-4)+Self(n-5): n in [1..60]]; // Vincenzo Librandi, Apr 04 2013
CROSSREFS
KEYWORD
nonn
AUTHOR
Gary W. Adamson, Mar 17 2005
EXTENSIONS
More terms from Colin Barker, Feb 13 2012
Better name, using formula from Ralf Stephan, Joerg Arndt, Sep 17 2013
STATUS
approved