OFFSET
0,15
COMMENTS
Integer-sided triangles with perimeter p that is not divisible by 6 cannot have side lengths in arithmetic progression and integer area. Proof: Let the three sides be in arithmetic progression: (x, y, z) = (p/3 - d, p/3, p/3 + d), where p is the perimeter. By Heron's formula, the area A is A = sqrt((p/2)*(p/6 + d)*(p/6)*(p/6 - d)). If p is not divisible by 6, then the radicand is not a perfect square, so A is not an integer. Hence, no integer-sided triangle with sides in arithmetic progression can have integer area when 6 does not divide p.
There is no triangle with integer area for d = 0 because A = sqrt(3*n*n*n*n) = sqrt(3)*n^2.
Right triangles counted in this sequence are of the form (3*k, 4*k, 5*k), where k is a positive integer. In terms with even n >= 2 therefore one right triangle is counted.
Observation: For n <= 50000, a(n) takes the values {0, 1, 2, 4, 7, 13, 22, 37, 40, 67}.
LINKS
Felix Huber, Table of n, a(n) for n = 0..10000
Eric Weisstein's World of Mathematics, Arithmetic Progression
Eric Weisstein's World of Mathematics, Heronian Triangle
EXAMPLE
The a(14) = 4 distinct integer-sided triangles with perimeter 14*6 = 84 and integer area whose sides are in arithmetic progression are (15, 28, 41) with area 126, (17, 28, 39) with area 210, (21, 28, 35) with area 294 and (26, 28, 30) with area 336.
MAPLE
MATHEMATICA
A387908[n_]:=Module[{a = 0, d}, For[d = 0, d <= n - 1, d++, If[IntegerQ[Sqrt[(n^2 - d^2)/3]], a = a + 1]]; a]; Array[A387908, 88, 0] (* James C. McMahon, Oct 15 2025 *)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Felix Huber, Sep 27 2025
STATUS
approved
