mersenneforum.org from i to π
 User Name Remember Me? Password
 Register FAQ Search Today's Posts Mark Forums Read

2016-09-06, 16:37   #12
science_man_88

"Forget I exist"
Jul 2009
Dumbassville

26×131 Posts

Quote:
 Originally Posted by CRGreathouse It sounds like you're guessing that the density of numbers $$c=x^2+y^2$$ with $$\gcd(x,y)=1$$ (A008784) is $$1/(2\pi)$$ and you're asking why this is. But I can't replicate your findings. Up to 2^5, for example, I get {1, 2, 5, 10, 13, 17, 25, 26, 29} with 9 members, not 4. What am I missing?
my first guess is that the amount shown approximates pi but was said to equate to roughly 2 pi. most of the conditions can take out a factor of 2. edit:also the formula uses https://oeis.org/A009003 I believe.edit2: okay or https://oeis.org/A008846 doh.

Last fiddled with by science_man_88 on 2016-09-06 at 16:51

 2016-09-06, 16:53 #13 CRGreathouse     Aug 2006 3×1,993 Posts Ah, you think he meant c^2 = u^2 + v^2 rather than c = u^2 + v^2? That doesn't match either, though: I get n count up to 2^n 5 10 6 25 7 59 8 126 9 273 10 582 11 1218 12 2533 13 5232 14 10736 15 21951 16 44746 17 90947 18 184641 19 374145 20 757076 21 1530424 22 3090576 23 6235578 24 12572648 25 25334464 Last fiddled with by CRGreathouse on 2016-09-06 at 16:54
2016-09-06, 17:03   #14
science_man_88

"Forget I exist"
Jul 2009
Dumbassville

203008 Posts

Quote:
 Originally Posted by CRGreathouse Ah, you think he meant c^2 = u^2 + v^2 rather than c = u^2 + v^2? That doesn't match either, though: I get
Quote:
 Originally Posted by A008846 Not only the square of these numbers is equal to the sum of two nonzero squares, but the numbers themselves also are; this sequence is then a subsequence of A004431. - Jean-Christophe Hervé, Nov 10 2013
so c=v^2+u^2 works. for c<2^n. you still get the same numbers I think but the statement is about that hitting 2 pi in ratio with 2^n ( aka that ratio ((2^(n-1))/(number of prim. pythag triples) tends to pi as n tends to infinity)

Last fiddled with by science_man_88 on 2016-09-06 at 17:05

2016-09-06, 17:04   #15
CRGreathouse

Aug 2006

3·1,993 Posts

Quote:
 Originally Posted by science_man_88
For that I get
n count up to 2^n
5 5
6 9
7 18
8 33
9 66
10 125
11 240
12 461
13 889
14 1712
15 3314
16 6419
17 12463
18 24228
19 47186
20 91999
21 179632
22 351056
23 686701
24 1344660
25 2635323
which still doesn't match. bhelmes, would you clarify which numbers you're counting?

2016-09-06, 17:08   #16
science_man_88

"Forget I exist"
Jul 2009
Dumbassville

26×131 Posts

Quote:
 Originally Posted by CRGreathouse which still doesn't match. bhelmes, would you clarify which numbers you're counting?
I was mostly trying to guide you to the OEIS for another look at what you might be thinking as the data doesn't match ( also maybe the primitive pythagorean triples allow a hypotenuse in more than one way ? if so that may be throwing the count off ? you were trying to find the numbers in the middle of things when the ratios was being shown to go towards pi. edit:
Quote:
 Earlier we saw that the graph of the number of primitive Pythagorean triangles with a hypotenuse less than N was virtually a straight line when plotted against N: Since the "straight line" graph goes through the origin, we can also graph the ratio of (the number of primitive Pythagorean triangles with hypotenuse less than N) / N. This ratio seems to be settling down to a particular value as N gets larger: what is this value? Discovered by D N Lehmer in 1900 it is 1 = 1 = 1 = 0.1591549.. 2π 2×3.1415926.. 6.283185..
this is what it might be getting at ?

Last fiddled with by science_man_88 on 2016-09-06 at 17:16

 2016-09-06, 18:03 #17 bhelmes     Mar 2016 1011101112 Posts A peaceful evening, i used a simple program in c: #include #include #include int gcd (int x, int y) { int t; while (y) { t = x; x = y; y = t % y; } return(x); } int main (void) { unsigned long int i, u, v, c, limit, anzahl; double erg; limit=32; for (i=5; i<40; i++) { u=1; v=2; anzahl=0; while (u*u
 2016-09-06, 18:49 #18 CRGreathouse     Aug 2006 135338 Posts I think your program is trying to count A008784 but it's buggy. It produces 5, 10, 17, 29, 34, 37, 41, 50, 58, 61, 65, 74, 85, 89, 97, 101, 122, 130 but not 13, 25, 26, etc.
2016-09-06, 19:23   #19
a1call

"Rashid Naimi"
Oct 2015
Remote to Here/There

22·32·61 Posts

Quote:
 Originally Posted by bhelmes c=u^2+v^2 < 2^n Has anybody a good mathematical explication for that ?
Well, that does look like the equation of a circle of radius sqrt(c) centered at 0,0:

sqrt(c)^2= u^2+v^2

Perhaps that has something to do with it.

Last fiddled with by a1call on 2016-09-06 at 19:24

 2016-09-07, 17:51 #20 bhelmes     Mar 2016 5678 Posts A peaceful day for all, 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 Besides for me is the pair (2,5)=(5,2) For every combination of (u,v) i could construct a=u²-v², b=2uv and c=u²+v² m=a/c and n=b/c is a vector in the unit circle But i did not get the relationship with 2pi Any ideas ? Greetings from the primes Bernhard
2016-09-07, 17:54   #21
science_man_88

"Forget I exist"
Jul 2009
Dumbassville

26·131 Posts

Quote:
 Originally Posted by bhelmes A peaceful day for all, 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 Besides for me is the pair (2,5)=(5,2) For every combination of (u,v) i could construct a=u²-v², b=2uv and c=u²+v² m=a/c and n=b/c is a vector in the unit circle But i did not get the relationship with 2pi Any ideas ? Greetings from the primes Bernhard
http://www.tsm-resources.com/alists/trip.html

you could generate it with two variables m and n. m>n. then the gcd is only important because if two sides have a gcd>1 then the sum that gets rooted will have that factor if it has it an even number of times ( power wise) then the square root will have it as well. or that's my main understanding of it though if all three have a GCD>1 it allows that to be divided out and the pythagorean theorem will work out for the lower version. edit: doh forgot all primitive ones have and even and an odd leg so a gcd greater than 1 means it can't be primitive.

Last fiddled with by science_man_88 on 2016-09-07 at 18:02

2016-09-07, 20:54   #22
CRGreathouse

Aug 2006

3·1,993 Posts

Quote:
 Originally Posted by bhelmes 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....

All times are UTC. The time now is 16:37.

Tue Jan 18 16:37:32 UTC 2022 up 179 days, 11:06, 0 users, load averages: 1.35, 1.26, 1.24

Copyright ©2000 - 2022, Jelsoft Enterprises Ltd.

This forum has received and complied with 0 (zero) government requests for information.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.
A copy of the license is included in the FAQ.

≠ ± ∓ ÷ × · − √ ‰ ⊗ ⊕ ⊖ ⊘ ⊙ ≤ ≥ ≦ ≧ ≨ ≩ ≺ ≻ ≼ ≽ ⊏ ⊐ ⊑ ⊒ ² ³ °
∠ ∟ ° ≅ ~ ‖ ⟂ ⫛
≡ ≜ ≈ ∝ ∞ ≪ ≫ ⌊⌋ ⌈⌉ ∘ ∏ ∐ ∑ ∧ ∨ ∩ ∪ ⨀ ⊕ ⊗ 𝖕 𝖖 𝖗 ⊲ ⊳
∅ ∖ ∁ ↦ ↣ ∩ ∪ ⊆ ⊂ ⊄ ⊊ ⊇ ⊃ ⊅ ⊋ ⊖ ∈ ∉ ∋ ∌ ℕ ℤ ℚ ℝ ℂ ℵ ℶ ℷ ℸ 𝓟
¬ ∨ ∧ ⊕ → ← ⇒ ⇐ ⇔ ∀ ∃ ∄ ∴ ∵ ⊤ ⊥ ⊢ ⊨ ⫤ ⊣ … ⋯ ⋮ ⋰ ⋱
∫ ∬ ∭ ∮ ∯ ∰ ∇ ∆ δ ∂ ℱ ℒ ℓ
𝛢𝛼 𝛣𝛽 𝛤𝛾 𝛥𝛿 𝛦𝜀𝜖 𝛧𝜁 𝛨𝜂 𝛩𝜃𝜗 𝛪𝜄 𝛫𝜅 𝛬𝜆 𝛭𝜇 𝛮𝜈 𝛯𝜉 𝛰𝜊 𝛱𝜋 𝛲𝜌 𝛴𝜎 𝛵𝜏 𝛶𝜐 𝛷𝜙𝜑 𝛸𝜒 𝛹𝜓 𝛺𝜔