OFFSET
1,5
LINKS
Charles R Greathouse IV, Table of n, a(n) for n = 1..10000
EXAMPLE
(1,1,1) is the only triangle up to n=4; (3,4,5) is added for n=5 and n=6.
MATHEMATICA
triangles[n_] := Module[{count = 0},
For[a = 1, a <= n, a++,
For[b = a, b <= n, b++,
For[c = b, c <= n, c++,
If[(a + b > c) && (b + c > a) && (c + a > b) && CoprimeQ[a, b, c],
count++]]]];
count];
triangles[#] & /@ Range[50]
PROG
(PARI) a(n)=sum(a=3, n-2, sum(b=a+1, n-1, if(gcd(a, b)==1, sum(c=b+1, min(a+b-1, n), gcd(a*b, c)==1))))+1 \\ Charles R Greathouse IV, Jun 29 2015
CROSSREFS
KEYWORD
nonn
AUTHOR
Vincent J. Matsko, Jun 27 2015
STATUS
approved