%I #96 Jun 30 2022 07:56:20
%S 0,0,1,3,8,15,27,42,64,90,125,165,216,273,343,420,512,612,729,855,
%T 1000,1155,1331,1518,1728,1950,2197,2457,2744,3045,3375,3720,4096,
%U 4488,4913,5355,5832,6327,6859,7410,8000,8610,9261,9933,10648,11385,12167,12972,13824
%N a(n) = floor(n^2/4)*(n/2).
%C Wiener index of cycle of length n.
%C a(n+1) is the sum of labeled number of boxes arranged as pyramid with base n. The sum of boxes is A002620(n+1). See the illustration in links. - _Kival Ngaokrajang_, Jul 02 2013
%H T. D. Noe, <a href="/A034828/b034828.txt">Table of n, a(n) for n = 0..1000</a>
%H M. Janjic and B. Petkovic, <a href="http://arxiv.org/abs/1301.4550">A Counting Function</a>, arXiv 1301.4550 [math.CO], 2013.
%H Kival Ngaokrajang, <a href="/A034828/a034828.jpg">Illustration for n = 1..10</a>.
%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/WienerIndex.html">Wiener Index</a>.
%H H. J. Wiener, <a href="http://dx.doi.org/10.1021/ci980148q">Structural Determination of Paraffin Boiling Points</a>, J. Amer. Chem. Soc. 69 (1947), 17-20.
%H J. Zerovnik, <a href="http://dx.doi.org/10.1021/ja01193a005">Szeged index of symmetric graphs</a>, J. Chem. Inf. Comput. Sci., 39 (1999), 77-80.
%H <a href="/index/Rec#order_06">Index entries for linear recurrences with constant coefficients</a>, signature (2,1,-4,1,2,-1).
%F a(n) = (n^2-1)*n/8 if n is odd, otherwise n^3/8.
%F From _Paul Barry_, May 13 2005: (Start)
%F G.f.: x^2*(1+x+x^2)/((1-x)^2*(1-x^2)^2).
%F a(n) = 2*a(n-1) +a(n-2) -4*a(n-3) +a(n-4) +2*a(n-5) -a(n-6).
%F a(n) = (2*n^3 +12*n^2 +23*n +14)/16 +(n+2)*(-1)^n/16.
%F a(n) = Sum_{k=0..floor((n+2)/2)} ((n+2)/(n+2-k))(-1)^k*C(n+2-k, k)* C(n-2*k+2, 2)*C(n-2*k, floor((n-2*k)/2)). [Typo corrected by _R. J. Mathar_, Aug 18 2008] (End)
%F a(n) = (2*n^2 - 1 + (-1)^n) * n / 16. - _Michael Somos_, Sep 06 2008
%F Euler transform of length 3 sequence [3, 2, -1]. - _Michael Somos_, Sep 06 2008
%F a(-n) = -a(n). - _Michael Somos_, Sep 06 2008
%F a(2n) = A000578(n). a(2n+1) = 3*A000330(n). a(n) = n*A002620(n)/2. - _Michael Somos_, Sep 06 2008
%F a(n) = (-n + Sum_{k=1..n} A007310(k)^2)/24. - _Jesko Matthes_, Feb 19 2021
%F Sum_{n>=2} 1/a(n) = 6 - 8*log(2) + zeta(3). - _Amiram Eldar_, Apr 16 2022
%F a(n) = Sum_{k=1..n} A062717(k)/4. - _Sela Fried_, Jun 27 2022
%e G.f.: x^2 + 3*x^3 + 8*x^4 + 15*x^5 + 27*x^6 + 42*x^7 + 64*x^8 + 90*x^9 + ...
%p A034828:=n->n*floor(n^2/4)/2; seq(A034828(k), k=0..100); # _Wesley Ivan Hurt_, Nov 05 2013
%t Table[Floor[n^2/4] n/2, {n, 0, 50}] (* _Harvey P. Dale_, Jun 10 2011 *)
%t LinearRecurrence[{2, 1, -4, 1, 2, -1}, {0, 0, 1, 3, 8, 15}, 50] (* _Harvey P. Dale_, Jun 10 2011 *)
%o (PARI) {a(n) = (n^2 \ 4) * n / 2} /* _Michael Somos_, Sep 06 2008 */
%o (PARI) {a(n) = if( n<0, -a(-n), polcoeff( x^2 * (1 + x + x^2) / ((1 - x)^2 * (1 - x^2)^2) + x * O(x^n), n))} /* _Michael Somos_, Sep 06 2008 */
%o (Magma) [Floor(n^2/4)*(n/2): n in [0..50]]; // _G. C. Greubel_, Feb 23 2018
%Y Equals A005996/2.
%Y Partial sums of A001318.
%Y Cf. A107231.
%Y Cf. A000578, A000330, A002620.
%Y Cf. A002620, A007310.
%Y Cf. A062717.
%K nonn,easy,nice
%O 0,4
%A _N. J. A. Sloane_
%E Definition reworded by _Michael Somos_, Sep 06 2008