mersenneforum.org  

Go Back   mersenneforum.org > Math Stuff > Computer Science & Computational Number Theory > PARI/GP

Reply
 
Thread Tools
Old 2010-09-01, 15:04   #1288
3.14159
 
3.14159's Avatar
 
May 2010
Prime hunting commission.

24×3×5×7 Posts
Default

Quote:
Originally Posted by CRGreathouse
When you submit that sequence, you may wish to include its relative density in the primes (you can probably work this out, or else find my post where I give it) and cross-references (at least to A180362).
I made a crossref to A180362. I sent it. It's A175768.
3.14159 is offline   Reply With Quote
Old 2010-09-01, 16:28   #1289
CRGreathouse
 
CRGreathouse's Avatar
 
Aug 2006

3·1,993 Posts
Default

I assume that when you say "no restrictions" you mean "k > 1".

Quote:
Originally Posted by 3.14159 View Post
Made sequence A175768 for the sequence with no restriction on k, meaning the 4n + 1 primes are a subset of the sequence, and my guess on how much of the sequence are 4n + 1 primes = 85 to 99 percent.
It's 94.7028...%. I prefer to express this as a relative density of 0.527967... in the primes.

Quote:
Originally Posted by 3.14159 View Post
I have the members of this sequence up to 4k.
To 10,000 it's just the 4n+1 primes plus 530 exceptions:
Code:
163,271,379,487,811,919,1459,1567,1783,1999,2539,2647,2971,3079,3187,3511,3727,3943,4051,4159,4483,4591,5023,5347,5563,5779,6211,6427,6967,7507,7723,8263,8803,9127,9343,9883,10099,10531,10639,11071,11287,11503,11719,11827,12043,12583,12799,12907,13339,13879,14419,14851,15391,15607,15823,16363,16903,17011,17443,17551,17659,18199,18307,18523,19387,19603,19819,19927,20143,20359,20899,21871,22303,23059,23167,23599,24247,24571,25111,25219,25759,25867,26083,26407,26731,26839,26947,27271,27487,27919,28027,28351,29863,30187,30403,30727,31051,31159,31267,31699,32563,32779,32887,33211,33427,33751,33967,34183,34939,35803,35911,36343,36451,36559,37423,37747,37963,38287,38611,39043,39367,39799,40123,40231,40771,40879,41203,41851,41959,42283,42391,42499,43579,44119,44983,45307,45523,45631,46171,46279,46819,47143,47251,47791,48871,49411,49627,49843,50383,50599,50707,50923,51031,51679,51787,52543,53299,53407,53623,53731,54163,54919,55243,55351,56431,57727,57943,58699,59023,59239,59671,59779,59887,60103,60427,60859,61291,61507,61723,62047,63127,63559,63667,64747,65071,65179,65287,65719,65827,67231,67339,67447,67987,68311,68743,69067,69499,69931,70039,70687,71011,71119,71443,71551,71983,72091,72307,72739,73063,73387,73819,74143,75223,75979,76303,76519,77167,77383,77491,78031,78139,78571,78787,79111,79867,80191,80407,81163,81703,81919,82351,82567,82891,83431,85159,86131,86239,87103,87211,87427,87643,87751,89371,90019,90127,91099,91423,91639,92179,92503,93151,94447,94771,95203,95311,95419,95527,95959,96823,96931,97039,97579,97687,98011,98227,98443,99523,100279,100927,101359,101467,102547,102763,102871,103087,103843,103951,104059,104383,104491,104707,105031,106219,106543,106759,106867,107839,108271,108379,109567,109891,110323,110431,110647,110863,111187,112807,113023,113131,113779,114319,114643,114859,114967,115183,115399,115831,116047,116371,116803,116911,117127,117883,117991,118423,118747,118751,119179,119503,119611,119827,120691,120907,121123,121447,122203,122527,122743,123499,123931,124147,124363,124471,125119,125551,125659,126199,126307,126631,126739,127711,127819,128467,128683,129223,129439,129763,130087,130303,130411,130843,131059,131251,131707,132247,132679,133327,133543,134191,134731,134839,134947,135271,136027,136351,136999,138079,138403,138511,138727,139267,139483,139591,140779,141319,142183,142939,143263,144451,144667,144883,145207,145423,145531,145963,146719,147151,147583,147799,148123,148339,148663,149419,150067,150607,151471,151579,151687,151903,152443,152767,153523,153739,154279,154387,154927,155251,156007,156979,157303,157411,157519,157627,157951,158923,159463,159571,159787,160651,161407,161731,161839,161947,162703,163027,163243,163351,163567,164431,165079,165511,166807,167023,167779,167887,168211,168643,169399,169831,170047,170263,170371,171559,172423,173827,174259,174367,174583,174799,174907,175447,175663,176419,177283,177823,178039,178903,179119,179659,180307,180847,181063,181387,181603,181711,181927,182467,182899,183439,183763,183871,183979,184087,184627,184843,185167,185491,185599,185707,185923,186247,186679,187003,187111,187219,187651,188299,188407,189271,190027,190243,190783,190891,192187,193051,193751,194239,194671,195103,195319,195427,195751,195967,196291,196831,197371,197479,197803,198127,199207,201151,201907,202231,202339,202879,202987,203311,203419,204067,204931,206251,206551,207199,207307,207523,207847,208279,208387,208927,209359
To 1e5 there are 5313 exceptions, but b-files are usually limited to 10,000 terms.

Last fiddled with by CRGreathouse on 2010-09-01 at 16:44
CRGreathouse is offline   Reply With Quote
Old 2010-09-01, 16:45   #1290
3.14159
 
3.14159's Avatar
 
May 2010
Prime hunting commission.

24·3·5·7 Posts
Default

Quote:
Originally Posted by Charles
It's 94.7028...%. I prefer to express this as a relative density of 0.527967... in the primes.
Excellent. Slightly less than 95% of them, or about 18 parts in 19 are 4n + 1 primes. How did you manage to work out the percentage?

Quote:
Originally Posted by Charles
To 10,000 it's just the 4n+1 primes plus 530 exceptions:
How do you sort them in numerical order, anyway?

Also: I assume you listed the set of primes that were not 4n + 1s.

Last fiddled with by 3.14159 on 2010-09-01 at 16:53
3.14159 is offline   Reply With Quote
Old 2010-09-01, 17:11   #1291
CRGreathouse
 
CRGreathouse's Avatar
 
Aug 2006

3×1,993 Posts
Default

Quote:
Originally Posted by 3.14159 View Post
I assume you listed the set of primes that were not 4n + 1s.
That is what I wrote, yes.

Quote:
Originally Posted by 3.14159 View Post
Excellent. Slightly less than 95% of them, or about 18 parts in 19 are 4n + 1 primes. How did you manage to work out the percentage?
Clearly all primes of the form k * 4^4 + 1 are also of the form k1 * 2^2 + 1, and in general so are all primes of the form k * (2a)^(2a) + 1. Generalizing further, we need only consider primes; numbers of the form k * 25^25 + 1 are also of the form k1 * 5^5 + 1.

This avoids the general use of inclusion-exclusion (which requires a great number of terms) since powers of distinct primes are coprime. So you have a simple, rapidly-converging infinite product over primes. The first dozen primes are sufficient to calculate 60 decimal places.
CRGreathouse is offline   Reply With Quote
Old 2010-09-01, 17:17   #1292
3.14159
 
3.14159's Avatar
 
May 2010
Prime hunting commission.

168010 Posts
Default

Quote:
Originally Posted by Charles
Clearly all primes of the form k * 4^4 + 1 are also of the form k1 * 2^2 + 1, and in general so are all primes of the form k * (2a)^(2a) + 1. Generalizing further, we need only consider primes; numbers of the form k * 25^25 + 1 are also of the form k1 * 5^5 + 1.
I think you meant, k * (2a) ^ (2a) + 1.

Quote:
Originally Posted by Charles
This avoids the general use of inclusion-exclusion (which requires a great number of terms) since powers of distinct primes are coprime. So you have a simple, rapidly-converging infinite product over primes. The first dozen primes are sufficient to calculate 60 decimal places.
The series can be expressed as.. ?

Last fiddled with by 3.14159 on 2010-09-01 at 17:19
3.14159 is offline   Reply With Quote
Old 2010-09-01, 17:40   #1293
CRGreathouse
 
CRGreathouse's Avatar
 
Aug 2006

3×1,993 Posts
Default

Quote:
Originally Posted by 3.14159 View Post
I think you meant, k * (2a) ^ (2a) + 1.
No. If that was all I knew I couldn't avoid terms like 6^6 which would cause a combinatorial explosion in the calculation.

Quote:
Originally Posted by 3.14159 View Post
The series can be expressed as.. ?
See if you can come up with it! 1 in 4 are 1 mod 4, 1 in 27 are 1 mod 27, so since 4 and 27 are relatively prime, 1/4 + 1/27 - 1/(4 * 27) are 1 mod 4 or 1 mod 27.
CRGreathouse is offline   Reply With Quote
Old 2010-09-01, 18:17   #1294
3.14159
 
3.14159's Avatar
 
May 2010
Prime hunting commission.

24·3·5·7 Posts
Default

Quote:
Originally Posted by Charles
No. If that was all I knew I couldn't avoid terms like 6^6 which would cause a combinatorial explosion in the calculation.
Oh, I see my error. Pardon.
Quote:
Originally Posted by Charles
See if you can come up with it! 1 in 4 are 1 mod 4, 1 in 27 are 1 mod 27, so since 4 and 27 are relatively prime, 1/4 + 1/27 - 1/(4 * 27) are 1 mod 4 or 1 mod 27.
1/4 + 1/27 + 1/3125 + 1/823543 + 1/285311670611 + 1/302875106592253 + 1/827240261886336764177 + 1/1978419655660313589123979 + 1/20880467999847912034355032910567 + .... - 1/(4 * 27 * 3125 * 823543 * 285311670611 * 302875106592253 * 827240261886336764177 * 1978419655660313589123979 * 20880467999847912034355032910567 * ....) ??

Last fiddled with by 3.14159 on 2010-09-01 at 18:18
3.14159 is offline   Reply With Quote
Old 2010-09-01, 18:24   #1295
CRGreathouse
 
CRGreathouse's Avatar
 
Aug 2006

3×1,993 Posts
Default

That will be too large, since it's only removing one congruence class mod H (the huge product). You removed 1 mod H, but you also need to remove 1 + 4*27, 1 + 2*4*27, ... mod H.

I suggest looking at it as a product rather than a sum, it's easier to express.
CRGreathouse is offline   Reply With Quote
Old 2010-09-01, 18:26   #1296
3.14159
 
3.14159's Avatar
 
May 2010
Prime hunting commission.

24×3×5×7 Posts
Default

Quote:
Originally Posted by Charles
I suggest looking at it as a product rather than a sum, it's easier to express.
Speaking of the sums.. The sums converge to this: A094289

Here are the first 300 digits:
Code:
0.287358251306224179736418045878932206955908802685881709299499368947089329278688939770209124280029090055929603180132199757677833174625274203928613500682866624372279071764951496386358568820464783694988950221338310990369641738444509170337274489547045606825482008978904241753401587644678759939089840746020
When extended to all integers:

Code:
1.29128599706266354040728259059560054149861936827452231731000244513694453876523445555881704112942970898499507092481543054841048741928486419757916355594791369649697415687802079972917794827300902564923055072096663812846701205368574597870300127789412928825355177022238337531934574925996777964830084954911

Last fiddled with by 3.14159 on 2010-09-01 at 18:32
3.14159 is offline   Reply With Quote
Old 2010-09-01, 18:35   #1297
3.14159
 
3.14159's Avatar
 
May 2010
Prime hunting commission.

32208 Posts
Default

Factoring each for a bit: Former: 2 ^ 2 * 5 * 7 * 62039 * 4685224417 * c283

Latter: 43 * 199 * 353 * 285101 * 546233 * 72659134783 * 74772299267 * c260
3.14159 is offline   Reply With Quote
Old 2010-09-01, 18:47   #1298
CRGreathouse
 
CRGreathouse's Avatar
 
Aug 2006

3·1,993 Posts
Default

Quote:
Originally Posted by 3.14159 View Post
Speaking of the sums.. The sums converge to this: A094289
Right. That's too big, though -- it double-counts 4 residues mod 108, for example, making it too large by at least 4/108 = 3.7...%.
CRGreathouse is offline   Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Why do I sometimes see all the <> formatting commands when I quote or edit? cheesehead Forum Feedback 3 2013-05-25 12:56
Passing commands to PARI on Windows James Heinrich Software 2 2012-05-13 19:19
Ubiquity commands Mini-Geek Aliquot Sequences 1 2009-09-22 19:33
64-bit Pari? CRGreathouse Software 2 2009-03-13 04:22
Are these commands correct? jasong Linux 2 2007-10-18 23:40

All times are UTC. The time now is 23:12.


Fri Aug 6 23:12:56 UTC 2021 up 14 days, 17:41, 1 user, load averages: 4.28, 4.23, 4.06

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