A259053 Number of triangles with sides pairwise relatively prime and one maximal side being n; permutations of sides are not considered distinct.
1, 0, 0, 0, 1, 0, 3, 2, 4, 1, 11, 2, 17, 6, 8, 9, 32, 6, 42, 12, 22, 15, 64, 12, 56, 25, 49, 25, 107, 12, 124, 51, 64, 45, 86, 27, 180, 59, 91, 45, 225, 30, 250, 81, 96, 87, 302, 55, 263, 82
Offset: 1
Keywords
Links
- Charles R Greathouse IV, Table of n, a(n) for n = 1..10000
Crossrefs
First differences of A259446.
Programs
-
Mathematica
triangles[n_] := Module[{count = 0}, For[a = 1, a <= n, a++, For[b = a, b <= n, b++, If[(a + b > n) && CoprimeQ[a, b, n], count++]]]; count]; triangles[#] & /@ Range[50]
-
PARI
a(n)=if(n==1, return(1)); sum(a=3,n-2, if(gcd(a,n)==1, my(an=a*n); sum(b=max(a+1,n-a+1), n-1, gcd(an, b)==1))) \\ Charles R Greathouse IV, Jun 29 2015