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.

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

This page as a plain text file.
%I A104584 #41 Feb 14 2023 15:49:55
%S A104584 0,1,7,12,26,35,57,70,100,117,155,176,222,247,301,330,392,425,495,532,
%T A104584 610,651,737,782,876,925,1027,1080,1190,1247,1365,1426,1552,1617,1751,
%U A104584 1820,1962,2035,2185,2262,2420
%N A104584 a(n) = (1/2) * ( 3*n^2 + n*(-1)^n ).
%C A104584 Previous name was: Pentagonal wave sequence of the first kind.
%C A104584 Odd-indexed terms = A033570, pentagonal numbers with odd index (1, 12, 35, 70, ...). Even-indexed terms = A049453, 2nd pentagonal numbers with even index (0, 7, 26, 57, 100, ...).
%C A104584 Companion sequence A104585 (Pentagonal wave sequence of the second kind), switches odd with even applications and vice versa. The pentagonal wave sequence triangle A104586 has A104584 in odd columns and A104585 in even columns.
%C A104584 Exponents of q in the identity Sum_{n >= 0} ( q^n*Product_{k = 1..n} (1 - q^(4*k-3)) ) = 1 + q - q^7 - q^12 + q^26 + q^35 - - + + .... 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
%H A104584 Vincenzo Librandi, <a href="/A104584/b104584.txt">Table of n, a(n) for n = 0..1000</a>
%H A104584 Wikipedia, <a href="https://en.wikipedia.org/wiki/Pentagonal_number_theorem">Pentagonal number theorem</a>.
%H A104584 <a href="/index/Rec#order_05">Index entries for linear recurrences with constant coefficients</a>, signature (1,2,-2,-1,1).
%F A104584 a(n) = a(n-1) + 2*a(n-2) - 2*a(n-3) - a(n-4) + a(n-5). - _Vincenzo Librandi_, Apr 04 2013
%F A104584 a(n) = (1/2) * (3*n^2 + n*(-1)^n ). - _Ralf Stephan_, May 20 2007
%F A104584 G.f. -x*(1+6*x+3*x^2+2*x^3) / ( (1+x)^2*(x-1)^3 ). - _R. J. Mathar_, Jan 10 2011
%F A104584 From _Amiram Eldar_, Feb 22 2022: (Start)
%F A104584 Sum_{n>=1} 1/a(n) = 6 - Pi/sqrt(3) - 4*log(2).
%F A104584 Sum_{n>=1} (-1)^(n+1)/a(n) = 2*Pi/sqrt(3) + 3*log(3) - 6. (End)
%e A104584 a(5) = 35 = A000326(5).
%e A104584 a(6) = 57 = A005449(6).
%t A104584 Table[(1/2) (3 n^2 + n (-1)^n), {n, 0, 100}] (* _Vincenzo Librandi_, Apr 04 2013 *)
%t A104584 LinearRecurrence[{1,2,-2,-1,1},{0,1,7,12,26},50] (* _Harvey P. Dale_, Feb 14 2023 *)
%o A104584 (Magma) I:=[0, 1, 7, 12, 26]; [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..50]]; // _Vincenzo Librandi_, Apr 04 2013
%Y A104584 Cf. A000326, A005449, A049453, A033568, A104585, A104586.
%K A104584 nonn,easy
%O A104584 0,3
%A A104584 _Gary W. Adamson_, Mar 17 2005
%E A104584 Better name, using formula from _Ralf Stephan_, _Joerg Arndt_, Sep 17 2013