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.

A104585 a(n) = (1/2) * ( 3*n^2 - n*(-1)^n ).

Original entry on oeis.org

0, 2, 5, 15, 22, 40, 51, 77, 92, 126, 145, 187, 210, 260, 287, 345, 376, 442, 477, 551, 590, 672, 715, 805, 852, 950, 1001, 1107, 1162, 1276, 1335, 1457, 1520, 1650, 1717, 1855, 1926, 2072, 2147, 2301, 2380, 2542, 2625, 2795, 2882, 3060, 3151, 3337, 3432, 3626
Offset: 0

Views

Author

Gary W. Adamson, Mar 17 2005

Keywords

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

Examples

			a(5) = 40 = A005449(5), a second pentagonal number.
a(6) = 51 = A000326(6), a pentagonal number.
		

Crossrefs

Programs

  • 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
  • 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 *)

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)

Extensions

More terms from Colin Barker, Feb 13 2012
Better name, using formula from Ralf Stephan, Joerg Arndt, Sep 17 2013