Thread: from i to π
View Single Post
Old 2016-09-07, 20:54   #22
CRGreathouse
 
CRGreathouse's Avatar
 
Aug 2006

5,987 Posts
Default

Quote:
Originally Posted by bhelmes View Post
i count the amount of number
with c=u²+v² with gcd (u, v)=1 and c < 2^n

or better all the combination with u²+v²<2^n and gcd (u,v)=1

i do not understand what the gcd (u, v)=1 makes with the result.

the gcd (u,v)=1 is important for the construction of primitiv pyth. triples
as far as i can see.

for example: limit = 2^5 = 32
u, v = 1, 2
= 2, 3
= 2, 5
= 3, 4
You left out 1^2 + 3^2 = 10 < 32. I think that when you correct your program it will count A008784 and you'll get the constant I had computed, 3/(4*Pi) = 0.2387324146378....
CRGreathouse is offline   Reply With Quote