20160906, 16:37  #12  
"Forget I exist"
Jul 2009
Dumbassville
2^{6}·131 Posts 
Quote:
Last fiddled with by science_man_88 on 20160906 at 16:51 

20160906, 16:53  #13 
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 20160906 at 16:54 
20160906, 17:03  #14  
"Forget I exist"
Jul 2009
Dumbassville
2^{6}×131 Posts 
Quote:
Quote:
Last fiddled with by science_man_88 on 20160906 at 17:05 

20160906, 17:04  #15  
Aug 2006
3×1,993 Posts 
Quote:
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? 

20160906, 17:08  #16  
"Forget I exist"
Jul 2009
Dumbassville
2^{6}·131 Posts 
Quote:
Quote:
Last fiddled with by science_man_88 on 20160906 at 17:16 

20160906, 18:03  #17 
Mar 2016
2^{2}×89 Posts 
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 
20160906, 18:49  #18 
Aug 2006
1011101011011_{2} 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. 
20160906, 19:23  #19  
"Rashid Naimi"
Oct 2015
Remote to Here/There
2^{3}·269 Posts 
Quote:
sqrt(c)^2= u^2+v^2 Perhaps that has something to do with it. Last fiddled with by a1call on 20160906 at 19:24 

20160907, 17:51  #20 
Mar 2016
2^{2}·89 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 
20160907, 17:54  #21  
"Forget I exist"
Jul 2009
Dumbassville
8384_{10} Posts 
Quote:
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 20160907 at 18:02 

20160907, 20:54  #22  
Aug 2006
3·1,993 Posts 
Quote:

