login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A337087 Number of integer-sided triangles with perimeter n where the harmonic mean of the side lengths is not an integer. 1
0, 0, 0, 0, 1, 0, 2, 1, 1, 1, 4, 2, 4, 4, 6, 5, 8, 5, 10, 7, 11, 10, 14, 11, 16, 13, 17, 15, 21, 17, 23, 21, 26, 24, 29, 24, 32, 30, 35, 32, 40, 35, 44, 40, 44, 43, 51, 46, 56, 51, 60, 54, 64, 59, 69, 63, 74, 70, 80, 73, 84, 78, 88, 84, 95, 90, 102, 96, 107, 100, 113, 105, 119, 113 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,7
LINKS
Wikipedia, Integer Triangle
FORMULA
a(n) = Sum_{k=1..floor(n/3)} Sum_{i=k..floor((n-k)/2)} sign(floor((i+k)/(n-i-k+1))) * (1 - chi(3*i*k*(n-i-k)/(i*k+k*(n-i-k)+i*(n-i-k)))), where chi(n) = 1 - ceiling(n) + floor(n).
a(n) = A005044(n) - A337086(n).
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
Sequence in context: A305502 A308211 A140130 * A321312 A327502 A354090
KEYWORD
nonn,easy
AUTHOR
Wesley Ivan Hurt, Aug 14 2020
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified March 28 20:05 EDT 2024. Contains 371254 sequences. (Running on oeis4.)