login
A308209
Number of integer-sided triangles with perimeter n whose largest side length is coprime to n.
2
0, 0, 1, 0, 1, 0, 2, 1, 2, 0, 4, 2, 5, 1, 4, 3, 8, 2, 10, 5, 7, 3, 14, 5, 13, 5, 13, 9, 21, 7, 24, 12, 17, 9, 20, 10, 33, 12, 24, 15, 40, 13, 44, 22, 24, 18, 52, 18, 48, 22, 40, 30, 65, 21, 50, 31, 49, 30, 80, 19, 85, 35, 50, 45, 70, 32, 102, 51, 71, 42, 114
OFFSET
1,7
FORMULA
a(n) = Sum_{k=1..floor(n/3)} Sum_{i=k..floor((n-k)/2)} sign(floor((i+k)/(n-i-k+1))) * [gcd(n-i-k,n) = 1], where [] is the Iverson bracket.
MATHEMATICA
Table[Sum[Sum[Floor[1/GCD[n - i - k, n]] Sign[Floor[(i + k)/(n - i - k + 1)]], {i, k, Floor[(n - k)/2]}], {k, Floor[n/3]}], {n, 100}]
CROSSREFS
Cf. A308202.
Sequence in context: A070963 A174064 A139158 * A366403 A212215 A182270
KEYWORD
nonn
AUTHOR
Wesley Ivan Hurt, May 15 2019
STATUS
approved