%I #78 Sep 08 2022 08:45:50
%S 0,0,1,3,7,13,22,34,50,70,95,125,161,203,252,308,372,444,525,615,715,
%T 825,946,1078,1222,1378,1547,1729,1925,2135,2360,2600,2856,3128,3417,
%U 3723,4047,4389,4750,5130,5530,5950,6391,6853,7337,7843,8372,8924,9500
%N Partial sums of A002620.
%C Essentially a duplicate of A002623: 0, 0, followed by A002623.
%C The only primes in this sequence are 3, 7, and 13: for n > 2 both a(2*n+1) = n*(n+1)*(4*n+5)/6 and a(2*n) = n*(n+1)*(4*n-1)/6 are composite. - _Bruno Berselli_, Jan 19 2011
%C a(n-1) is the number of integer-sided scalene triangles with largest side <= n, including degenerate (i.e., collinear) triangles. a(n-2) is the number of non-degenerate integer-sided scalene triangles. - _Alexander Evnin_, Oct 12 2010
%C Also n-th differences of square pyramidal numbers (A000330) and numbers of triangles in triangular matchstick arrangement of side n (A002717). - _Konstantin P. Lakov_, Apr 13 2018
%D A. Yu. Evnin. Problem book on discrete mathematics. Moscow: Librokom, 2010; problem 787. (In Russian)
%H Vincenzo Librandi, <a href="/A173196/b173196.txt">Table of n, a(n) for n = 0..10000</a>
%H W. Lanssens, B. Demoen, and P.-L. Nguyen, <a href="https://lirias.kuleuven.be/1656296">The Diagonal Latin Tableau and the Redundancy of its Disequalities</a>, Report CW 666, July 2014, Department of Computer Science, KU Leuven.
%H M. Merca, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL14/Merca/merca3.html">Inequalities and Identities Involving Sums of Integer Functions</a>, J. Int. Seq. 14 (2011) # 11.9.1.
%H <a href="/index/Rec#order_05">Index entries for linear recurrences with constant coefficients</a>, signature (3,-2,-2,3,-1).
%F G.f.: x^2 / ((1-x)^3 * (1-x^2)).
%F a(n) = (4*n^3 + 6*n^2 - 4*n - 3 + 3*(-1)^n)/48. - _Bruno Berselli_, Jan 19 2011
%F a(n) = A002623(n-2) for n >= 2. - _Martin von Gagern_, Dec 05 2014
%F a(n) = Sum_{i=0..n} A002620(i) = Sum_{i=0..n} floor(i/2)*ceiling(i/2) = Sum_{i=0..n} floor(i^2/4).
%F a(n) = round((2*n^3 + 3*n^2 - 2*n)/24) = round((4*n^3 + 6*n^2 - 4*n - 3)/48) = floor((2*n^3 + 3*n^2 - 2*n)/24) = ceiling((2*n^3 + 3*n^2 - 2*n - 3)/24). - _Mircea Merca_, Nov 23 2010
%F a(n) = a(n-2) + n*(n-1)/2, n > 1. - _Mircea Merca_, Nov 25 2010
%F a(n) = floor(n/2)*(floor(n/2)+1)*(8*ceiling(n/2) - 2*n - 1)/6. - _Alexander Evnin_, Oct 12 2010
%F a(n) = -a(-1-n) for all n in Z. - _Michael Somos_, Jan 14 2021
%F E.g.f.: (x*(3 + 9*x + 2*x^2)*cosh(x) - (3 - 3*x - 9*x^2 - 2*x^3)*sinh(x))/24. - _Stefano Spezia_, Jun 02 2021
%e a(57) = 0 + 0 + 1 + 2 + 4 + 6 + 9 + 12 + 16 + 20 + 25 + 30 + 36 + 42 + 49 + 56 + 64 + 72 + 81 + 90 + 100 + 110 + 121 + 132 + 144 + 156 + 169 + 182 + 196 + 210 + 225 + 240 + 256 + 272 + 289 + 306 + 324 + 342 + 361 + 380 + 400 + 420 + 441 + 462 + 484 + 506 + 529 + 552 + 576 + 600 + 625 + 650 + 676 + 702 + 729 + 756 + 784 + 812 = 15834.
%t CoefficientList[Series[x^2/((1 - x)^3 (1 - x^2)), {x, 0, 50}], x] (* _Vincenzo Librandi_, Mar 26 2014 *)
%t Accumulate[Floor[Range[0,60]^2/4]] (* or *) LinearRecurrence[{3,-2,-2,3,-1},{0,0,1,3,7},60] (* _Harvey P. Dale_, Feb 09 2020 *)
%t a[ n_] := Quotient[2 n^3 + 3 n^2 - 2 n, 24]; (* _Michael Somos_, Jan 14 2021 *)
%o (Magma) [Floor((2*n^3+3*n^2-2*n)/24): n in [0..60]]; // _Vincenzo Librandi_, Jun 25 2011
%Y Cf. A000212, A000330, A002620, A002623, A002717, A002984, A007590, A024206, A056827, A072280, A087811, A118013, A118015.
%K nonn,easy
%O 0,4
%A _Jonathan Vos Post_, Feb 12 2010