cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A259446 Number of triangles with sides pairwise relatively prime and no greater than n; permutations of sides are not considered distinct.

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