![]() |
![]() |
#89 |
Mar 2019
1010001102 Posts |
![]() |
![]() |
![]() |
![]() |
#90 |
Jul 2014
22×3×5 Posts |
![]()
Here's a Quiz I created to help people focus, and get feedback on their basic understanding of PGT.
There are 20 simple questions, which if you understand PGT, are easy|quick to answer. Only a few of them require any computations. It can be done in 5-10 minutes. If you send me your Quiz results I'll let you know how you did. https://www.academia.edu/75838729/On...nion_Test_Quiz |
![]() |
![]() |
![]() |
#91 |
"Ben"
Feb 2007
7·13·41 Posts |
![]()
This is a wheel sieve; a.k.a, sieving over residue classes. It is implemented in a compact form, which is nice, but there is no ground-breaking theory here.
Post the segmented version of the sieve... the one you have here is not competitive as-is. Also, if you try it, I think you'll find that the difficult part is keeping it fast when you are finding primes in ranges up around 10^18. This is where primesieve truly shines. |
![]() |
![]() |
![]() |
#92 | |
Jul 2014
22·3·5 Posts |
![]() Quote:
It stays completely within the domain of the residues, and is not part of a greater sieve approach. 2) "..but there is no ground-breaking theory here" I've seen nothing that even comes close to the math and logic of PGT that explains (literally), everything about the distribution and characteristics of primes. 3) "Post the segmented version of the sieve" Please read the thread. The paper and code (in 6 languages for both Twin and Cousin Primes) has been posted multiple times. 4) "the difficult part is keeping it fast ..up around 10^18..where primesieve truly shines." Primesieve is excellent software, well written and maintained. But if you look at its (humongous) code base, it's really 3 different algorithm implementations for small, medium, and large values within 64-bits, and its goals are much broader, and it's been developed for a much, much longer time. If you read my papers (which it seems you haven't) I explain where the coding implementations can be improved. But that's an "engineering" consideration. The math of PGT is the most efficient|simple there is to characterize and find all the primes, of all types (Twins, Cousins, Sexys, Mersennes, etc). I notice you say nothing of the performance difference below 10^18, where it's shown the SSoZ is much faster, with only a fraction of the code size (one short file). Plus, my SSoZ implementations give you the largest Prime in the region of interest (for free), which Primesieve doesn't. My first paper on this was released in 2008 (14 years ago atow, July, 14, 2022). Everything about my knowledge and development of the math, theory, and coding has improved, and I expect that to continue. It's been implemented by a number of people, in various languages, and has over and over been shown to empirically work, i.e. provide correct results, very fast. I don't consider my work to be in competition with Primesieve, or any others. It stands on its own. I think people should understand it, use it where applicable|desirable, and it should be taught in academic institutions. Ultimately it will, because it answers questions, and provides deep understanding about the framework of primes, other methods can't, or not as easily and clearly. |
|
![]() |
![]() |
![]() |
#93 |
Jul 2014
6010 Posts |
![]()
As a further example of the utility, and power, of PGT let's see how its use creates a conceptually,
as well as mathematically, simple(r) understanding of this following topic. This is an expansion of the explanation on this topic provided to a questioner, David Gustavsson my video here. https://www.youtube.com/watch?v=HCUiPknHtfY In the wikipedia article on Polignac's Conjecture (which I prove is true). https://wiki2.org/en/Polignac%27s_conjecture It presents where the product extends over all prime numbers p ≥ 3. But this value is off by a factor of 2, because the sequence should start with p=2, the first prime. The expression for If you include for p=2 then it would becomes: and thus for p=2, where these primorial expressions are computed as follows, here upto P23 (from my paper). For P23 modulus: modp23 = (p-0)# = 2 * 3 * 5 * 7 * 11 * 13 * 17 * 19 * 23 = 223092870 For P23 residues: rescount = (p-1)# = 1 * 2 * 4 * 6 * 10 * 12 * 16 * 18 * 22 = 36495360 For P23 twins|cousin: pairs = (p-2)# = 1 * 1 * 3 * 5 * 9 * 11 * 15 * 17 * 21 = 7952175 So I'm extending the notation to include p=2 into the thought process, to fully characterizes how all the primes (and their gaps) contribute to the structure of Prime Generators. So let's analyze The article states: "For example, In fact, PGT shows (visually and empirically) why the number of residue gaps of 2 and 4 are equal and odd, and their gap frequency coefficients are: Thus empirically for But PGT conceptually tells you this is really the product of 2 ratios (physical mathematical realities): Which is a metric defining a normalized rate of expansion of the primes as the number line is broken into larger groups of modpn size. and Which defines a countervailing rate of decrease in the number space, for the number of twin|cousin residue pairs over the total number of residues. Thus Prime Generator Theory (PGT) not only gives a similar (correct) empirical expressions classical Number Theory does, it actually provides the framework to conceptually understand, and explain structurally, what is going on. And the number of Pn residue gaps of 6 has the recursion relationship: where the So the whole field of Prime Number Theory needs to be reevaluated, and analyzed, using PGT. It would certainly be much easier for students to learn, and also much easier, and simpler, for people to teach. Now it becomes easy to understand, and show, how as the normalized bandwidth primes expansion rate the number space percentage containing possible twin|cousin primes is decreased by p. So Their product for Here is a short Ruby program (using my primes-utils RubyGem) to compute their values for the first 1,000 primes. You can modify it to compute their values for whatever number of primes you have memory|time to compute. Code:
require "primes/utils" # Load primes-utils RubyGem (need to install on system first) # Get 1,000th prime value (its 7919)" p1000 = 1000.nthprime # Create array of first 1,000 primes" primes1000 = p1000.primes # Compute ratios: r1, r2, and c2, and print values for every 100th prime # To make code easy, initialize values for first prime p=2 r1, r2, c2 = 2, 1, 2 # Start using array primes for p=3, i.e. primes1000[1] primes1000[1..].each_with_index do |p, i| p_1 = (p - 1).to_f # make integer value for p floating point r1 = (r1 * p ) / p_1 # update r1 for current prime r2 = (r2 * (p-2)) / p_1 # update r2 for current prime c2 = r1 * r2 # update c2 for current prime pth_prime = i + 2 # prmth val for current prime if pth_prime % 100 == 0 # if prmth value a multiple of 100 output results puts "\nUpto #{pth_prime}th prime #{p}" puts "r1 = #{r1} \nr2 = #{r2} \nC2 = #{c2} \n" end end Code:
Upto 100th prime 541 r1 = 11.267620389582685 r2 = 0.117208472127214 C2 = 1.3206605703724303 Upto 200th prime 1223 r1 = 12.714305399732526 r2 = 0.10385598009615431 C2 = 1.3204566485310485 Upto 300th prime 1987 r1 = 13.55336218102954 r2 = 0.09742244361035737 C2 = 1.3204016628121005 Upto 400th prime 2741 r1 = 14.143788321617125 r2 = 0.09335387299959709 C2 = 1.3203774187094295 Upto 500th prime 3571 r1 = 14.600162046719854 r2 = 0.09043488777762677 C2 = 1.3203640162302757 Upto 600th prime 4409 r1 = 14.97268389297606 r2 = 0.08818429692348541 C2 = 1.3203556021596883 Upto 700th prime 5279 r1 = 15.285994047978852 r2 = 0.08637645148081055 C2 = 1.3203499232212041 Upto 800th prime 6133 r1 = 15.556739346163312 r2 = 0.08487291685854093 C2 = 1.320345845116911 Upto 900th prime 6997 r1 = 15.79552976103645 r2 = 0.08358964822246509 C2 = 1.3203427762125148 Upto 1000th prime 7919 r1 = 16.008556779361957 r2 = 0.08247716653126569 C2 = 1.3203404034166584 Prime numbers don't occur randomly!! When you break the number line into even number groups, the best size being primorials, the primes are distributed evenly along the residues within the group. So for every prime, you always know where it is for a given group size (modpn), because you can always parameterize its residue value r and residue group value k. And from this simple, observable, structure, you can learn everything there is to know about primes. |
![]() |
![]() |
![]() |
#94 | |
Jul 2022
5 Posts |
![]() Quote:
Here is the counterevidence. The attached screenshot shows a list of candidate primes up to about 1,000 that were generated using the "P5 generator", with the composites crossed out. Here is the Fortran program that I used to generate the output in the screenshot. It uses ANSI escape sequences to cross out the composite numbers in the display. Code:
program p5show implicit none integer i,j,k,pc,nrej,npr integer :: r(8) = [1,7,11,13,17,19,23,29] integer :: spr(12) = [2,3,5,7,11,13,17,19,23,29,31,37] !primes <= isqrt(N_max) logical :: comp character(4) :: sb,se sb = char(27)//'[9m' se = char(27)//'[0m' npr = 0 print *,' k Candidates 30*k+r(1:8) # rejected' print * do k = 0,33 write(*,'(I4,4x)',advance='no')k nrej = 0 do j = 1,8 pc = 30*k+r(j) ! prime candidate, "P5 generator" comp = any(mod(pc,spr)==0).and. .not.any(pc==spr) if(comp.or.(k==0.and.j==1))then !if candidate = 1 or is composite nrej = nrej+1 write(*,'(2x,A,I4,A)',advance='no')sb,pc,se else ! tested to be prime write(*,'(2x,I4)',advance='no')pc npr = npr+1 endif end do print '(7xi1)',nrej end do print '(/,I5,1x,A)',npr,' primes' end program |
|
![]() |
![]() |
![]() |
#95 |
Jul 2014
22×3×5 Posts |
![]()
This is an info/data dump of what I've been working on during summer 2022.
In August 2022 I generated all the ai gap coefficients for P41 (it took 7 day, 6 hr, 27 mins, 48.298 secs) This enabled me to confirm the recursive form for a1 - a7 produced correct results for it. Code:
P37 P41 a1 = 217,929,355,875 8,499,244,879,125 a2 = 217,929,355,875 8,499,244,879,125 a3 = 293,920,842,950 11,604,850,743,850 a4 = 91,589,444,450 3,682,730,287,600 a5 = 108,861,586,050 4,396,116,829,650 a6 = 83,462,164,156 3,474,628,537,016 a7 = 34,861,119,734 1,475,437,583,074 a8 = 16,996,070,868 741,616,123,248 a9 = 21,218,333,416 949,982,718,776 a10 = 4,814,320,320 230,780,018,520 a11 = 5,454,179,550 252,605,556,450 a12 = 4,073,954,144 199,070,346,484 a13 = 918,069,454 47,895,816,494 a14 = 857,901,000 45,885,975,600 a15 = 535,673,924 31,307,108,764 a16 = 58,664,256 3,887,806,536 a17 = 69,404,898 4,391,607,498 a18 = 46,346,428 3,247,427,048 a19 = 7,381,190 606,169,690 a20 = 10,176,048 756,088,668 a21 = 4,153,336 363,563,276 a22 = 526,596 57,663,276 a23 = 291,342 32,658,714 a24 = 239,760 29,314,704 a25 = 91,392 11,018,808 a26 = 8,912 1,684,756 a27 = 25,320 3,980,340 a28 = 2,952 537,324 a29 = 1,654 37,574 a30 = 452 127,928 a31 = 26 9,262 a32 = 48 14,400 a33 = 24 7,680 a34 = 332 a35 = 360 a36 = 48 a37 = 2 Code:
a1 = a1'(pn-2) a2 = a2'(pn-2) a3 = a3'(pn-3) + a2' + a1' a4 = a4'(pn-4) + a3' a5 = a5'(pn-5) + 2*a4' + a3' a6 = a6'(pn-5) + 6*a5' - 2*a4' a7 = a7'(pn-7) + 3*a6' - 3*a5' + 4*a4' https://www.youtube.com/results?sear...ussel+Letkemen It's basically a guy reading a paper. I didn't bother to start looking at it seriously until around July 2022. Then I searched and found the paper he was reading, and in fact printed out his 4 vixra.org papers. https://vixra.org/author/russell_letkeman This paper was the one in the video - https://vixra.org/abs/1207.0071 He creates an algebra based on primorials which can generate the PG ai gap values. (His vernacular is different than mine, so I convert his to mine for consistency). Here are the Letkeman gap coefficients (based on reduced primorials). I regenerated|corrected his values from scratch using his reduced primorial matrix method. Code:
These are the one I've confirmed for the ai gaps upto P41. a1 = [1] a2 = [1] a3 = [2, -2] a4 = [1, -2, 1] a5 = [4/3, -3, 2] a6 = [2, -7, 10, -2] a7 = [6/5, -5, 28/3, -3] a8 = [1, -5, 12, -6, 1] a9 = [2, -23/2, 100/3, -22, 6] a10 = [4/3, -39/4, 116/3, -40, 24, -2] a11 = [10/9, -63/8, 632/21, -175/6, 72/5] a12 = [2, -17, 1738/21, -344/3, 108, -21] a13 = [12/11, -209/20, 11090/189, -1563/16, 4224/35, -119/3, 28/5] a14 = [6/5, -185/16, 456/7, -325/3, 662/5, -42, 16/3] These I computed using P41 data, but need P43 and greater ai gaps data to confirm. a15 = [8/3, -1207/40, 12986/63, -5221/12, 25376/35, -4285/12, 482/5, -45/4] a16 = [293/297, -249/20, 6091/63, -953/4, 371/7, -609/2, 1727/15, -43/2] a17 = [164924/155925, -4317/320, 20050/189, -76363/288, 19044/35, -41899/120, 668/5, -351/14] reduced primoral forms, and/or vice versa. To do the computations you need a table of all the reduced primorials for each mth prime Pm. I did the tables out to P47, here's the table for P23. Reduced Primorials table for p23 Code:
r = 0: (p-0)# = 2 * 3 * 5 * 7 * 11 * 13 * 17 * 19 * 23 = 223,092,870 r = 1: (p-1)# = 1 * 2 * 4 * 6 * 10 * 12 * 16 * 18 * 22 = 36,495,360 r = 2: (p-2)# = 1 * 1 * 3 * 5 * 9 * 11 * 15 * 17 * 21 = 7,952,175 r = 3: (p-3)# = 1 * 2 * 4 * 8 * 10 * 14 * 16 * 20 = 2,867,200 r = 4: (p-4)# = 1 * 3 * 7 * 9 * 13 * 15 * 19 = 700,245 r = 5: (p-5)# = 1 * 2 * 6 * 8 * 12 * 14 * 18 = 290,304 r = 6: (p-6)# = 1 * 5 * 7 * 11 * 13 * 17 = 85,085 r = 7: (p-7)# = 1 * 4 * 6 * 10 * 12 * 16 = 46,080 r = 8: (p-8)# = 3 * 5 * 9 * 11 * 15 = 22,275 r = 9: (p-9)# = 2 * 4 * 8 * 10 * 14 = 8,960 r = 10: (p-10)# = 1 * 3 * 7 * 9 * 13 = 2,457 r = 11: (p-11)# = 1 * 2 * 6 * 8 * 12 = 1,152 r = 12: (p-12)# = 1 * 5 * 7 * 11 = 385 r = 13: (p-13)# = 1 * 4 * 6 * 10 = 240 r = 14: (p-14)# = 3 * 5 * 9 = 135 r = 15: (p-15)# = 2 * 4 * 8 = 64 r = 16: (p-16)# = 1 * 3 * 7 = 21 r = 17: (p-17)# = 1 * 2 * 6 = 12 r = 18: (p-18)# = 1 * 5 = 5 r = 19: (p-19)# = 1 * 4 = 4 r = 20: (p-20)# = 3 = 3 r = 21: (p-21)# = 2 = 2 r = 22: (p-22)# = 1 = 1 r = 23: (p-23)# = 1 = 1 Thus to compute the gaps of size 16 for P23, use a8 = [1, -5, 12, -6, 1], as such. Code:
P23_a8 = 1*(p23-2)# - 5*(p23-3)# + 12*(p23-4)# - 6*(p23-5)# + 1*(p23-6)# = (7,952,175) - 5*(2,867,200) + 12*(700,245) - 6*(290,304) + (85,085) = 362,376 Letkeman also realizes his method establishes the Infinity of Twin Primes. He also establishes the frequency of the tuples {2,4} = {4,2} = (pm-3)# and they are atomic as well as the tuple {2,4,6,2,6,4} = (5/2)(pm-7)#. His papers are hard to read, if I didn't already know the larger framework he was trying to model. (He doesn't conceptually recognize Prime Generators, and how his structures fit into them). The key thing (for me) he showed how to model and compute all the possible residue tuple combinations for each Prime Generator (prime primorial modulus size), and show they are repeating patterns. Last fiddled with by jzakiya on 2022-09-21 at 20:07 |
![]() |
![]() |
![]() |
#96 | |
Dec 2008
you know...around...
24×53 Posts |
![]() Quote:
Code:
(22:52) gp > \rgaps_coprimes syntax: gaps(g,p) = #gaps with size g (<=212 or <=2p) in set of integers mod p# %1 = (g,p)->s=0;if(g%2==0,for(x=1,44,r=1;forprime(q=x+3,p,r*=(q-x-1));s+=a[g/2][x]*r*(-1)^(x+1));if(g==4&&p==2,s=0));if(nextprime(p+1)>g/2,s,0) (22:53) gp > gaps(16,23) %3 = 362376 (22:56) gp > forstep(g=2,74,2,print("gap: "g" - a"g/2"_P41 = "gaps(g,41))) gap: 2 - a1_P41 = 8499244879125 gap: 4 - a2_P41 = 8499244879125 gap: 6 - a3_P41 = 11604850743850 gap: 8 - a4_P41 = 3682730287600 gap: 10 - a5_P41 = 4396116829650 gap: 12 - a6_P41 = 3474628537016 gap: 14 - a7_P41 = 1475437583074 gap: 16 - a8_P41 = 741616123248 gap: 18 - a9_P41 = 949982718776 gap: 20 - a10_P41 = 230780018520 gap: 22 - a11_P41 = 252605556450 gap: 24 - a12_P41 = 199070346484 gap: 26 - a13_P41 = 47895816494 gap: 28 - a14_P41 = 45885975600 gap: 30 - a15_P41 = 31307108764 gap: 32 - a16_P41 = 3887806536 gap: 34 - a17_P41 = 4391607498 gap: 36 - a18_P41 = 3247427048 gap: 38 - a19_P41 = 606169690 gap: 40 - a20_P41 = 756088668 gap: 42 - a21_P41 = 363563276 gap: 44 - a22_P41 = 57663276 gap: 46 - a23_P41 = 32658714 gap: 48 - a24_P41 = 29314704 gap: 50 - a25_P41 = 11018808 gap: 52 - a26_P41 = 1684756 gap: 54 - a27_P41 = 3980340 gap: 56 - a28_P41 = 537324 gap: 58 - a29_P41 = 371574 gap: 60 - a30_P41 = 127928 gap: 62 - a31_P41 = 9262 gap: 64 - a32_P41 = 14400 gap: 66 - a33_P41 = 7680 gap: 68 - a34_P41 = 332 gap: 70 - a35_P41 = 360 gap: 72 - a36_P41 = 48 gap: 74 - a37_P41 = 2 (22:56) gp > ## *** last result computed in 0 ms. (22:56) gp > |
|
![]() |
![]() |
![]() |
#97 |
Jul 2014
22×3×5 Posts |
![]()
Hey mart_r, thanks for the post.
I hadn't even heard of Pari before, so I downloaded it and installed yesterday. I still don't know how to use it, but that's a learning process. :-) Can you do me a favor and generate the residue gaps for P43, P47..for as many as you feel like doing. That data will really help me refine and extend PGT empirically. I'm still looking at the other posts you gave for the coefficient values. That will save me allot of work, and corroborates what I've already done. One thing that still perplexes me is why people don't understand (seemingly besides Letkeman) this data empirically establishes the validity of Polignacs's Conjecture, of which the Twin Primes Conjecture is just the specific case for primes pairs that differ by 2. As you use more and more consecutive primes for a generator's modulus size Pm#, the number of new consecutive primes from r0 to r0^2 grows, and their gap spacing (and group tuples) grow without end, and will contain every possible gap|tuple combination possible as m -> infinity. If fact, for Twin and Cousin Primes, whose residues gap sizes for any m primes is: a1 = a2 = (pm-2)# and can be computed and estimated for any Pm# generator, they obviously always increase in frequency and can never hit some final end value! There is no way there can be some last Twin|Cousin Prime pair. It's just as simple as that! As one great man said: One of the hardest thing to do is to get people to accept the obvious! |
![]() |
![]() |
![]() |
#98 | |
Mar 2019
2·163 Posts |
![]() Quote:
You can make claims like "well it sure looks like there will be!" But that's not a proof. |
|
![]() |
![]() |
![]() |
#99 | |
"Serge"
Mar 2008
Phi(4,2^7658614+1)/2
19×232 Posts |
![]() Quote:
Listen carefully to the last lines in this demonstration |
|
![]() |
![]() |
![]() |
Thread Tools | |
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Twin Prime Constellations | robert44444uk | Prime Gap Searches | 45 | 2022-02-24 18:28 |
How do you efficiently sieve for prime 3/4-tuples? | Puzzle-Peter | Software | 156 | 2019-06-03 20:19 |
find very easy twin prime in the infamy twin primes | hal1se | Miscellaneous Math | 13 | 2018-11-05 16:34 |
Highest Prime is also a twin prime... NOT | hydeer | Lone Mersenne Hunters | 9 | 2018-04-03 22:54 |
Twin Prime Days, Prime Day Clusters | cuBerBruce | Puzzles | 3 | 2014-12-01 18:15 |