|
|
A054876
|
|
Number of pairwise incongruent triangles with integer sides and positive integer area and second longest side of length n.
|
|
2
|
|
|
0, 0, 0, 1, 2, 0, 0, 1, 0, 3, 0, 2, 4, 1, 4, 1, 4, 0, 0, 6, 1, 0, 0, 3, 10, 5, 0, 4, 6, 6, 0, 1, 1, 7, 7, 2, 5, 1, 8, 10, 6, 2, 0, 2, 5, 0, 0, 3, 0, 13, 13, 14, 6, 0, 7, 5, 0, 8, 0, 14, 9, 1, 3, 1, 23, 3, 0, 13, 2, 9, 0, 6, 7, 9, 19, 4, 1, 12, 0, 14, 0, 8, 0
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,5
|
|
LINKS
|
|
|
EXAMPLE
|
a(10) is 3 because there are three different integer-sided, integer-area triangles with middle side length 10, namely [9,10,17], [10,10,12], and [10,10,16].
|
|
MATHEMATICA
|
okQ[x_, y_, z_] := If[x + y <=z, False, Module[{s = (x + y + z)/2}, IntegerQ[ Sqrt[s(s-x)(s-y)(s-z)]]]]; a[n_] := Module[{num = 0}, Do[Do[If[okQ[x, n, z], num++], {x, 1, n}], {z, n, 2n}]; num]; Array[a, 100, 0] (* Amiram Eldar, Jun 19 2019 *)
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|