OFFSET
1,15
COMMENTS
From Bernard Schott, Oct 10 2020: (Start)
Equivalently: number of integer-sided triangles whose sides a < b < c are in arithmetic progression with perimeter n.
Equivalently: number of integer-sided triangles such that b = (a+c)/2 with a < c and perimeter n.
All the perimeters are multiple of 3 because each perimeter = 3 * middle side b.
For each perimeter n = 12*k with k>0, there exists one and only one such right integer triangle whose triple is (3k, 4k, 5k).
For the corresponding primitive triples and miscellaneous properties and references, see A336750. (End)
LINKS
Wikipedia, Integer Triangle
Index entries for linear recurrences with constant coefficients, signature (0,0,1,0,0,1,0,0,-1).
FORMULA
If n = 3*k, then a(n) = floor((n-3)/6) = A004526((n-3)/3), otherwise, a(3k+1) = a(3k+2) = 0. - Bernard Schott, Oct 10 2020
From Wesley Ivan Hurt, Nov 01 2020: (Start)
G.f.: x^9/((x^3 - 1)^2*(x^3 + 1)).
a(n) = a(n-3) + a(n-6) - a(n-9).
a(n) = (1 - ceiling(n/3) + floor(n/3)) * floor((n-3)/6). (End)
E.g.f.: (18 + (x - 6)*cosh(x) + (x - 3)*sinh(x) - exp(-x/2)*((9 + 3*exp(x) + x)*cos(sqrt(3)*x/2) + sqrt(3)*x*sin(sqrt(3)*x/2)))/18. - Stefano Spezia, Feb 29 2024
EXAMPLE
a(9) = 1 for the smallest such triangle (2, 3, 4).
a(12) = 1 for Pythagorean triple (3, 4, 5).
a(15) = 2 for the two triples (3, 5, 7) and (4, 5, 6).
MATHEMATICA
A024164[n_] := If[Mod[n, 3] == 0, Floor[(n - 3)/6], 0]; Array[A024164, 100] (* Wesley Ivan Hurt, Nov 01 2020 *)
LinearRecurrence[{0, 0, 1, 0, 0, 1, 0, 0, -1}, {0, 0, 0, 0, 0, 0, 0, 0, 1}, 120] (* Harvey P. Dale, Jun 03 2021 *)
CROSSREFS
Cf. A336750 (triples), A336751 (smallest side), A307136 (middle side), A336753 (largest side), A336754 (perimeter), this sequence (number of triangles whose perimeter = n), A336755 (primitive triples), A336756 (primitive perimeters), A336757 (number of primitive triangles with perimeter = n).
Cf. A005044 (number of integer-sided triangles with perimeter = n).
KEYWORD
nonn,easy
AUTHOR
STATUS
approved