%I #12 Mar 15 2020 17:58:23
%S 1,1,1,1,2,2,5,7,11,12,23,25,42,48,56,65,97,103,145,157,179,194,258,
%T 270,326,351,400,425,532,544,668,719,783,828,914,941,1121,1180,1271,
%U 1316,1541,1571,1821,1902,1998,2085,2387,2442,2705,2787
%N Number of triangles with sides pairwise relatively prime and no greater than n; permutations of sides are not considered distinct.
%H Charles R Greathouse IV, <a href="/A259446/b259446.txt">Table of n, a(n) for n = 1..10000</a>
%e (1,1,1) is the only triangle up to n=4; (3,4,5) is added for n=5 and n=6.
%t triangles[n_] := Module[{count = 0},
%t For[a = 1, a <= n, a++,
%t For[b = a, b <= n, b++,
%t For[c = b, c <= n, c++,
%t If[(a + b > c) && (b + c > a) && (c + a > b) && CoprimeQ[a, b, c],
%t count++]]]];
%t count];
%t triangles[#] & /@ Range[50]
%o (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
%K nonn
%O 1,5
%A _Vincent J. Matsko_, Jun 27 2015
|