|
|
A173196
|
|
Partial sums of A002620.
|
|
14
|
|
|
0, 0, 1, 3, 7, 13, 22, 34, 50, 70, 95, 125, 161, 203, 252, 308, 372, 444, 525, 615, 715, 825, 946, 1078, 1222, 1378, 1547, 1729, 1925, 2135, 2360, 2600, 2856, 3128, 3417, 3723, 4047, 4389, 4750, 5130, 5530, 5950, 6391, 6853, 7337, 7843, 8372, 8924, 9500
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,4
|
|
COMMENTS
|
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
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
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
|
|
REFERENCES
|
A. Yu. Evnin. Problem book on discrete mathematics. Moscow: Librokom, 2010; problem 787. (In Russian)
|
|
LINKS
|
|
|
FORMULA
|
G.f.: x^2 / ((1-x)^3 * (1-x^2)).
a(n) = (4*n^3 + 6*n^2 - 4*n - 3 + 3*(-1)^n)/48. - Bruno Berselli, Jan 19 2011
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).
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
a(n) = a(n-2) + n*(n-1)/2, n > 1. - Mircea Merca, Nov 25 2010
a(n) = floor(n/2)*(floor(n/2)+1)*(8*ceiling(n/2) - 2*n - 1)/6. - Alexander Evnin, Oct 12 2010
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
|
|
EXAMPLE
|
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.
|
|
MATHEMATICA
|
CoefficientList[Series[x^2/((1 - x)^3 (1 - x^2)), {x, 0, 50}], x] (* Vincenzo Librandi, Mar 26 2014 *)
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 *)
a[ n_] := Quotient[2 n^3 + 3 n^2 - 2 n, 24]; (* Michael Somos, Jan 14 2021 *)
|
|
PROG
|
(Magma) [Floor((2*n^3+3*n^2-2*n)/24): n in [0..60]]; // Vincenzo Librandi, Jun 25 2011
|
|
CROSSREFS
|
Cf. A000212, A000330, A002620, A002623, A002717, A002984, A007590, A024206, A056827, A072280, A087811, A118013, A118015.
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|