mersenneforum.org  

Go Back   mersenneforum.org > Math Stuff > Analysis & Analytic Number Theory

Reply
 
Thread Tools
Old 2016-09-06, 16:37   #12
science_man_88
 
science_man_88's Avatar
 
"Forget I exist"
Jul 2009
Dumbassville

838410 Posts
Default

Quote:
Originally Posted by CRGreathouse View Post
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
science_man_88 is offline   Reply With Quote
Old 2016-09-06, 16:53   #13
CRGreathouse
 
CRGreathouse's Avatar
 
Aug 2006

2×3×977 Posts
Default

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
CRGreathouse is offline   Reply With Quote
Old 2016-09-06, 17:03   #14
science_man_88
 
science_man_88's Avatar
 
"Forget I exist"
Jul 2009
Dumbassville

26·131 Posts
Default

Quote:
Originally Posted by CRGreathouse View Post
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
science_man_88 is offline   Reply With Quote
Old 2016-09-06, 17:04   #15
CRGreathouse
 
CRGreathouse's Avatar
 
Aug 2006

2×3×977 Posts
Default

Quote:
Originally Posted by science_man_88 View Post
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?
CRGreathouse is offline   Reply With Quote
Old 2016-09-06, 17:08   #16
science_man_88
 
science_man_88's Avatar
 
"Forget I exist"
Jul 2009
Dumbassville

838410 Posts
Default

Quote:
Originally Posted by CRGreathouse View Post
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
science_man_88 is offline   Reply With Quote
Old 2016-09-06, 18:03   #17
bhelmes
 
bhelmes's Avatar
 
Mar 2016

11×23 Posts
Default

A peaceful evening,

i used a simple program in c:
#include <stdio.h>
#include <math.h>
#include <stdlib.h>

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<limit)
{
while (v*v<limit)
{
if (gcd (u,v)==1)
{
c=u*u+v*v;
if (c<limit) anzahl++;
else break;
}
v+=2;
}
if (v%2==0) v=1;
else v=2;
u+=2;
}

erg=(double)limit / (anzahl*2);
printf ( "2^n = %lu. ", i);
printf ( "anzahl = %lu", anzahl);
printf ( " ~pi = %2.20f\n", erg);
limit*=2;

}
}

with the result :
2^n = 5. anzahl = 4 ~pi = 4.00000000000000000000
2^n = 6. anzahl = 11 ~pi = 2.90909090909090917165
2^n = 7. anzahl = 18 ~pi = 3.55555555555555535818
2^n = 8. anzahl = 38 ~pi = 3.36842105263157876038
2^n = 9. anzahl = 81 ~pi = 3.16049382716049365172
2^n = 10. anzahl = 163 ~pi = 3.14110429447852768092
2^n = 11. anzahl = 323 ~pi = 3.17027863777089802255
2^n = 12. anzahl = 653 ~pi = 3.13629402756508435246
2^n = 13. anzahl = 1310 ~pi = 3.12671755725190836372
2^n = 14. anzahl = 2607 ~pi = 3.14230916762562317857
2^n = 15. anzahl = 5211 ~pi = 3.14411821147572423385
2^n = 16. anzahl = 10426 ~pi = 3.14291195089200092738
2^n = 17. anzahl = 20863 ~pi = 3.14125485308920104899
2^n = 18. anzahl = 41728 ~pi = 3.14110429447852768092
2^n = 19. anzahl = 83429 ~pi = 3.14212084526963053577
2^n = 20. anzahl = 166871 ~pi = 3.14187605995050089902
2^n = 21. anzahl = 333787 ~pi = 3.14145248317040515218
2^n = 22. anzahl = 667584 ~pi = 3.14140542613364015523
2^n = 23. anzahl = 1335065 ~pi = 3.14164778493930985093
2^n = 24. anzahl = 2670147 ~pi = 3.14162778303966039317
2^n = 25. anzahl = 5340303 ~pi = 3.14162248846179714690
2^n = 26. anzahl = 10680690 ~pi = 3.14159778066772821248
2^n = 27. anzahl = 21361461 ~pi = 3.14158586812016293877
2^n = 28. anzahl = 42722757 ~pi = 3.14159800127131294545
2^n = 29. anzahl = 85445541 ~pi = 3.14159700855542611819
2^n = 30. anzahl = 170891241 ~pi = 3.14159408556229058362
2^n = 31. anzahl = 341782682 ~pi = 3.14159224720461427438
2^n = 32. anzahl = 683565237 ~pi = 3.14159283088294305486
2^n = 33. anzahl = 1367130421 ~pi = 3.14159295267411797781
2^n = 34. anzahl = 2734261194 ~pi = 3.14159254823553624192
2^n = 35. anzahl = 5468521887 ~pi = 3.14159283605332317890
2^n = 36. anzahl = 10937044186 ~pi = 3.14159271770907722043
2^n = 37. anzahl = 21874088616 ~pi = 3.14159268266539415393
2^n = 38. anzahl = 43748178397 ~pi = 3.14159259900578557989
2^n = 39. anzahl = 87496355552 ~pi = 3.14159264360030610064
2^n = 40. anzahl = 174992710606 ~pi = 3.14159265254075359408
2^n = 41. anzahl = 349985420298 ~pi = 3.14159266074514009759
2^n = 42. anzahl = 699970842728 ~pi = 3.14159265117634811659
2^n = 43. anzahl = 1399941683244 ~pi = 3.14159265614027116698

Any explication ?

Greetings from the primes
Bernhard
bhelmes is offline   Reply With Quote
Old 2016-09-06, 18:49   #18
CRGreathouse
 
CRGreathouse's Avatar
 
Aug 2006

16E616 Posts
Default

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.
CRGreathouse is offline   Reply With Quote
Old 2016-09-06, 19:23   #19
a1call
 
a1call's Avatar
 
"Rashid Naimi"
Oct 2015
Out of my Body

25×3×19 Posts
Default

Quote:
Originally Posted by bhelmes View Post
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
a1call is offline   Reply With Quote
Old 2016-09-07, 17:51   #20
bhelmes
 
bhelmes's Avatar
 
Mar 2016

11×23 Posts
Default

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
bhelmes is offline   Reply With Quote
Old 2016-09-07, 17:54   #21
science_man_88
 
science_man_88's Avatar
 
"Forget I exist"
Jul 2009
Dumbassville

26×131 Posts
Default

Quote:
Originally Posted by bhelmes View Post
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
science_man_88 is offline   Reply With Quote
Old 2016-09-07, 20:54   #22
CRGreathouse
 
CRGreathouse's Avatar
 
Aug 2006

10110111001102 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
Reply

Thread Tools


All times are UTC. The time now is 01:24.

Mon Jul 13 01:24:06 UTC 2020 up 109 days, 22:57, 0 users, load averages: 2.02, 2.07, 1.95

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, 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.