login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A156684 The number of primitive Pythagorean triples A^2+B^2=C^2 with 0 < A < B < C and gcd(A,B)=1, and both legs less than n. 1

%I #15 Mar 27 2020 09:03:14

%S 0,0,0,0,1,1,1,1,1,1,1,1,2,2,2,3,3,3,3,3,3,4,4,4,5,5,5,5,5,5,5,5,5,5,

%T 5,6,6,6,6,6,7,7,7,7,7,8,8,8,8,8,8,8,8,8,8,9,10,10,10,10,11,11,11,12,

%U 12,12,12,12,12,12,12,12,13,13,13,13,13,14,14,14,15,15,15,15,16,16

%N The number of primitive Pythagorean triples A^2+B^2=C^2 with 0 < A < B < C and gcd(A,B)=1, and both legs less than n.

%C For large N, Benito and Varona have shown that a(N)~2/pi^2 Log(1+sqrt(2)).N +O(sqrt(N)). However, the approximations to a(N)/N are considerably more accurate than the error term suggests, and it certainly appears that the density of the primitive triples with both legs less than N tends towards 2/pi^2 Log(1+sqrt(2))=0.1786... as N becomes large.

%H Ray Chandler, <a href="/A156684/b156684.txt">Table of n, a(n) for n = 1..10000</a>

%H Manuel Benito and Juan L. Varona, <a href="https://doi.org/10.1016/S0377-0427(01)00496-4">Pythagorean triangles with legs less than n</a>, Journal of Computational and Applied Mathematics 143, (2002), pp. 117-126.

%e There are two primitive triples with both legs less than 14, specifically (3,4,5) and (5,12,13). Hence a(14)=2.

%t PrimitivePythagoreanTriplets[n_]:=Module[{t={{3,4,5}},i=4,j=5},While[i<n,If[GCD[i,j]==1,h=Sqrt[i^2+j^2]; If[IntegerQ[h] && j<n,AppendTo[t,{i,j,h}]];]; If[j<n,j+=2,i++;j=i+1]];t];Append[{0,0,0,0},Length[PrimitivePythagoreanTriplets[ # ]]&/@Range[5,50]]//Flatten

%t (* Second program: *)

%t Join[{0}, Cases[Import["https://oeis.org/A024360/b024360.txt", "Table"], {_, _}][[;; 10000, 2]]] // Accumulate (* _Jean-François Alcover_, Mar 27 2020 *)

%Y Cf. Essentially partial sums of A024360.

%K easy,nice,nonn

%O 1,13

%A _Ant King_, Feb 17 2009

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 22:17 EDT 2024. Contains 371964 sequences. (Running on oeis4.)