OFFSET
1,7
LINKS
Reinhard Zumkeller, Integer-sided triangles
EXAMPLE
For n=15 there are A005044(15)=7 integer triangles: [1,7,7], [2,6,7], [3,5,7], [3,6,6], [4,4,7], [4,5,6] and [5,5,5]: four are isosceles: [1<7=7], [3<6=6], [4=4<7] and [5=5=5], but GCD(3,6,6)>1 and GCD(5,5,5)>1, therefore a(15)=2.
MATHEMATICA
m = 81 (* max perimeter *);
sides[per_] := Select[Reverse /@ IntegerPartitions[per, {3}, Range[ Ceiling[per/2]]], #[[1]] < per/2 && #[[2]] < per/2 && #[[3]] < per/2 &];
triangles = DeleteCases[Table[sides[per], {per, 3, m}], {}] // Flatten[#, 1] & // SortBy[Total[#] m^3 + #[[1]] m^2 + #[[2]] m + #[[1]] &] ;
a[n_] := Count[triangles, t_ /; Total[t] == n && Length[Union[t]] < 3 && GCD @@ t == 1];
Table[a[n], {n, 1, m}] (* Jean-François Alcover, Oct 05 2021 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Reinhard Zumkeller, May 05 2002
STATUS
approved