OFFSET
1,7
LINKS
Wikipedia, Integer Triangle
FORMULA
EXAMPLE
a(6) = 0; There is one integer-sided triangle with perimeter 6, [2,2,2]. The harmonic mean of its side lengths is 3*2*2*2/(2*2+2*2+2*2) = 2 (which is an integer), so a(6) = 0.
a(10) = 1; There are 2 integer-sided triangles with perimeter 10, [2,4,4] and [3,3,4]. For the harmonic mean of the [2,4,4] triangle, we get 3*2*4*4/(2*4+2*4+4*4) = 96/32 = 3 (an integer), but the harmonic mean for the [3,3,4] triangle is 3*3*3*4/(3*3+3*4+3*4) = 108/33 (not an integer). Thus, a(10) = 1.
MATHEMATICA
Table[Sum[Sum[(Ceiling[3*i*k*(n - i - k)/(i*k + k*(n - i - k) + i*(n - i - k))] - Floor[3*i*k*(n - i - k)/(i*k + k*(n - i - k) + i*(n - i - k))]) Sign[Floor[(i + k)/(n - i - k + 1)]], {i, k, Floor[(n - k)/2]}], {k, Floor[n/3]}], {n, 100}]
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Wesley Ivan Hurt, Aug 14 2020
STATUS
approved