PrimeGrid
Please visit donation page to help the project cover running costs for this month

Toggle Menu

Join PrimeGrid

Returning Participants

Community

Leader Boards

Results

Other

drummers-lowrise

Advanced search

Message boards : General discussion : List of prime numbers

Author Message
A_H_O_H
Send message
Joined: 9 Apr 17
Posts: 25
ID: 819725
Credit: 11,857,204
RAC: 0
PPS Sieve Silver: Earned 100,000 credits (117,985)TRP Sieve (suspended) Bronze: Earned 10,000 credits (19,223)AP 26/27 Turquoise: Earned 5,000,000 credits (8,947,159)GFN Ruby: Earned 2,000,000 credits (2,772,837)
Message 120192 - Posted: 28 Aug 2018 | 14:41:13 UTC

Hello. Do anyone have the lists of consecutive prime numbers?

Profile Eudy SilvaProject donor
Avatar
Send message
Joined: 26 Aug 17
Posts: 1543
ID: 918937
Credit: 342,052,559
RAC: 187,826
Discovered 2 mega primesFound 2 primes in the 2018 Tour de PrimesFound 1 prime in the 2019 Tour de PrimesFound 1 prime in the 2020 Tour de PrimesFound 1 prime in the 2021 Tour de Primes321 LLR Amethyst: Earned 1,000,000 credits (1,012,503)Cullen LLR Amethyst: Earned 1,000,000 credits (1,291,013)ESP LLR Amethyst: Earned 1,000,000 credits (1,151,976)Generalized Cullen/Woodall LLR Amethyst: Earned 1,000,000 credits (1,004,746)PPS LLR Sapphire: Earned 20,000,000 credits (20,014,581)PSP LLR Amethyst: Earned 1,000,000 credits (1,476,639)SoB LLR Ruby: Earned 2,000,000 credits (2,432,091)SR5 LLR Ruby: Earned 2,000,000 credits (2,954,518)SGS LLR Amethyst: Earned 1,000,000 credits (1,462,951)TRP LLR Amethyst: Earned 1,000,000 credits (1,574,163)Woodall LLR Amethyst: Earned 1,000,000 credits (1,001,901)321 Sieve (suspended) Amethyst: Earned 1,000,000 credits (1,119,749)Generalized Cullen/Woodall Sieve (suspended) Amethyst: Earned 1,000,000 credits (1,005,331)PPS Sieve Emerald: Earned 50,000,000 credits (68,690,867)AP 26/27 Emerald: Earned 50,000,000 credits (50,096,813)GFN Emerald: Earned 50,000,000 credits (79,692,417)WW Double Bronze: Earned 100,000,000 credits (104,012,000)PSA Ruby: Earned 2,000,000 credits (2,059,222)
Message 120193 - Posted: 28 Aug 2018 | 14:46:03 UTC - in response to Message 120192.
Last modified: 28 Aug 2018 | 14:49:27 UTC

You can Google for it.
For example, "first 1000 primes" shows many hits.
Among them is https://www.di-mgt.com.au/primes1000.html

Edit:
Or do you want something else ?
I might have not understood correctly.
____________
"Accidit in puncto, quod non contingit in anno."
Something that does not occur in a year may, perchance, happen in a moment.

Profile JeppeSNProject donor
Avatar
Send message
Joined: 5 Apr 14
Posts: 1534
ID: 306875
Credit: 35,660,505
RAC: 9,493
Found 1 prime in the 2020 Tour de Primes321 LLR Gold: Earned 500,000 credits (529,293)Cullen LLR Gold: Earned 500,000 credits (611,298)ESP LLR Silver: Earned 100,000 credits (174,818)Generalized Cullen/Woodall LLR Bronze: Earned 10,000 credits (35,236)PPS LLR Jade: Earned 10,000,000 credits (13,193,892)PSP LLR Silver: Earned 100,000 credits (428,457)SoB LLR Silver: Earned 100,000 credits (466,812)SR5 LLR Silver: Earned 100,000 credits (145,419)SGS LLR Silver: Earned 100,000 credits (112,277)TRP LLR Silver: Earned 100,000 credits (342,501)Woodall LLR Silver: Earned 100,000 credits (109,455)321 Sieve (suspended) Silver: Earned 100,000 credits (175,037)PPS Sieve Bronze: Earned 10,000 credits (10,113)AP 26/27 Bronze: Earned 10,000 credits (12,129)GFN Ruby: Earned 2,000,000 credits (2,059,478)WW Turquoise: Earned 5,000,000 credits (9,640,000)PSA Turquoise: Earned 5,000,000 credits (7,614,290)
Message 120194 - Posted: 28 Aug 2018 | 15:04:51 UTC

It depends on what you mean.

You can calculate your own list. If you go to https://pari.math.u-bordeaux.fr/gp.html and type:

primes(100)
you get the answer:
[2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281, 283, 293, 307, 311, 313, 317, 331, 337, 347, 349, 353, 359, 367, 373, 379, 383, 389, 397, 401, 409, 419, 421, 431, 433, 439, 443, 449, 457, 461, 463, 467, 479, 487, 491, 499, 503, 509, 521, 523, 541]



And if you type:
primes([10000000000,10000001000])
you get the answer:
[10000000019, 10000000033, 10000000061, 10000000069, 10000000097, 10000000103, 10000000121, 10000000141, 10000000147, 10000000207, 10000000259, 10000000277, 10000000279, 10000000319, 10000000343, 10000000391, 10000000403, 10000000469, 10000000501, 10000000537, 10000000583, 10000000589, 10000000597, 10000000601, 10000000631, 10000000643, 10000000649, 10000000667, 10000000679, 10000000711, 10000000723, 10000000741, 10000000753, 10000000793, 10000000799, 10000000807, 10000000877, 10000000883, 10000000889, 10000000949, 10000000963, 10000000991, 10000000993, 10000000999]



Both are lists of consecutive prime numbers.

/JeppeSN

dukebg
Volunteer tester
Avatar
Send message
Joined: 21 Nov 17
Posts: 241
ID: 950482
Credit: 23,670,125
RAC: 0
Found 1 prime in the 2018 Tour de Primes321 LLR Gold: Earned 500,000 credits (506,942)Cullen LLR Gold: Earned 500,000 credits (500,523)ESP LLR Gold: Earned 500,000 credits (655,642)Generalized Cullen/Woodall LLR Gold: Earned 500,000 credits (539,100)PPS LLR Gold: Earned 500,000 credits (688,232)PSP LLR Gold: Earned 500,000 credits (561,629)SoB LLR Ruby: Earned 2,000,000 credits (3,659,676)SR5 LLR Gold: Earned 500,000 credits (505,810)SGS LLR Gold: Earned 500,000 credits (506,024)TRP LLR Gold: Earned 500,000 credits (963,625)Woodall LLR Gold: Earned 500,000 credits (506,044)321 Sieve (suspended) Gold: Earned 500,000 credits (511,694)Generalized Cullen/Woodall Sieve (suspended) Gold: Earned 500,000 credits (549,916)PPS Sieve Gold: Earned 500,000 credits (701,168)AP 26/27 Gold: Earned 500,000 credits (525,590)GFN Jade: Earned 10,000,000 credits (10,762,872)WW Gold: Earned 500,000 credits (500,000)PSA Gold: Earned 500,000 credits (525,639)
Message 120195 - Posted: 28 Aug 2018 | 15:05:42 UTC
Last modified: 28 Aug 2018 | 15:06:32 UTC

If you want "the first N prime numbers" or "all prime numbers up to X", which is indeed something used for sieving (judging that the post is in the Sieving subforum), there's little to no reason to store them explicitly as they are much quicker generated on the fly (sieve of Eratosthenes, sieve of Sundaram, etc.) than read from disk/network. Nevertheless, there are lists of those on the internet, such as this.

Profile Michael GoetzProject donor
Volunteer moderator
Project administrator
Avatar
Send message
Joined: 21 Jan 10
Posts: 13648
ID: 53948
Credit: 285,463,897
RAC: 46,203
The "Shut up already!" badge:  This loud mouth has mansplained on the forums over 10 thousand times!  Sheesh!!!Discovered the World's First GFN-19 prime!!!Discovered 1 mega primeFound 1 prime in the 2018 Tour de PrimesFound 1 prime in the 2019 Tour de PrimesFound 1 prime in the 2020 Tour de PrimesFound 2 primes in the 2021 Tour de Primes321 LLR Turquoise: Earned 5,000,000 credits (5,132,712)Cullen LLR Turquoise: Earned 5,000,000 credits (5,038,114)ESP LLR Turquoise: Earned 5,000,000 credits (6,177,890)Generalized Cullen/Woodall LLR Ruby: Earned 2,000,000 credits (2,435,683)PPS LLR Sapphire: Earned 20,000,000 credits (20,751,038)PSP LLR Turquoise: Earned 5,000,000 credits (7,956,186)SoB LLR Sapphire: Earned 20,000,000 credits (36,067,618)SR5 LLR Jade: Earned 10,000,000 credits (10,007,110)SGS LLR Ruby: Earned 2,000,000 credits (3,718,606)TRP LLR Turquoise: Earned 5,000,000 credits (5,084,329)Woodall LLR Turquoise: Earned 5,000,000 credits (5,032,821)321 Sieve (suspended) Jade: Earned 10,000,000 credits (10,061,196)Cullen/Woodall Sieve (suspended) Ruby: Earned 2,000,000 credits (4,170,256)Generalized Cullen/Woodall Sieve (suspended) Turquoise: Earned 5,000,000 credits (5,059,304)PPS Sieve Sapphire: Earned 20,000,000 credits (22,885,121)Sierpinski (ESP/PSP/SoB) Sieve (suspended) Amethyst: Earned 1,000,000 credits (1,035,522)TRP Sieve (suspended) Ruby: Earned 2,000,000 credits (2,051,121)AP 26/27 Jade: Earned 10,000,000 credits (10,118,303)GFN Emerald: Earned 50,000,000 credits (78,031,938)WW Sapphire: Earned 20,000,000 credits (32,204,000)PSA Jade: Earned 10,000,000 credits (12,445,029)
Message 120196 - Posted: 28 Aug 2018 | 16:01:22 UTC - in response to Message 120192.

Hello. Do anyone have the lists of consecutive prime numbers?


It's important to note that almost nothing at PrimeGrid ever searches for consecutive prime numbers. In general, there's usually about a gazillion primes between any two of the primes in our database.

The only primes that are likely to be consecutive are the small number of twin primes we've found.

As has been noted in the earlier replies, there are lists on the Internet, some with a lot of entries, of very small consecutive primes that you can Google if you wish. Those aren't the kind of primes that PrimeGrid works with.
____________
My lucky number is 75898524288+1

Profile JeppeSNProject donor
Avatar
Send message
Joined: 5 Apr 14
Posts: 1534
ID: 306875
Credit: 35,660,505
RAC: 9,493
Found 1 prime in the 2020 Tour de Primes321 LLR Gold: Earned 500,000 credits (529,293)Cullen LLR Gold: Earned 500,000 credits (611,298)ESP LLR Silver: Earned 100,000 credits (174,818)Generalized Cullen/Woodall LLR Bronze: Earned 10,000 credits (35,236)PPS LLR Jade: Earned 10,000,000 credits (13,193,892)PSP LLR Silver: Earned 100,000 credits (428,457)SoB LLR Silver: Earned 100,000 credits (466,812)SR5 LLR Silver: Earned 100,000 credits (145,419)SGS LLR Silver: Earned 100,000 credits (112,277)TRP LLR Silver: Earned 100,000 credits (342,501)Woodall LLR Silver: Earned 100,000 credits (109,455)321 Sieve (suspended) Silver: Earned 100,000 credits (175,037)PPS Sieve Bronze: Earned 10,000 credits (10,113)AP 26/27 Bronze: Earned 10,000 credits (12,129)GFN Ruby: Earned 2,000,000 credits (2,059,478)WW Turquoise: Earned 5,000,000 credits (9,640,000)PSA Turquoise: Earned 5,000,000 credits (7,614,290)
Message 120199 - Posted: 28 Aug 2018 | 19:39:56 UTC

There are also consecutive primes in arithmetic progression, but apart from twin primes (already mentioned by Michael Goetz) PrimeGrid does not search for them. /JeppeSN

A_H_O_H
Send message
Joined: 9 Apr 17
Posts: 25
ID: 819725
Credit: 11,857,204
RAC: 0
PPS Sieve Silver: Earned 100,000 credits (117,985)TRP Sieve (suspended) Bronze: Earned 10,000 credits (19,223)AP 26/27 Turquoise: Earned 5,000,000 credits (8,947,159)GFN Ruby: Earned 2,000,000 credits (2,772,837)
Message 120220 - Posted: 30 Aug 2018 | 2:25:42 UTC - in response to Message 120195.
Last modified: 30 Aug 2018 | 3:12:49 UTC

You can Google for it.
For example, "first 1000 primes" shows many hits.
Among them is https://www.di-mgt.com.au/primes1000.html

This is a small list...

It depends on what you mean.
And if you type:
primes([10000000000,10000001000])
you get the answer:
...


But if I type
primes([10000000000,10000010000])

i got an error, because client-side JavaScript calculations there...

If you want "the first N prime numbers" or "all prime numbers up to X", which is indeed something used for sieving (judging that the post is in the Sieving subforum), there's little to no reason to store them explicitly as they are much quicker generated on the fly (sieve of Eratosthenes, sieve of Sundaram, etc.) than read from disk/network. Nevertheless, there are lists of those on the internet, such as this.

Last link seems good, but... Only 50 Millions?

I see here: https://primes.utm.edu/nthprime/ using database with 30 trillions... This is good, and I see fast searching N-th prime...
But... There is no consecutive primes lists with this range...

And... How long will be working the fastest algorithm
to sieve prime numbers and get first trillion consecutive primes, for example?

I think will be better to search Nth-prime,
just by using a skip sectors with consecutive primes,
and without invest there many MIPS, FLOPS and time
to check primality for each number...

1 gram DNA can containing 700 Terabytes information, and maybe this space can be filled as consecutive primes.
So I just see, you don't have projects to calculate consecutive primes, and don't have any database, like this:
http://primos.mat.br/

So I think this can be calculated, using molecular dinamycs and molecular computers, like the source of synergy for molecular nano-algorithmics...

dukebg
Volunteer tester
Avatar
Send message
Joined: 21 Nov 17
Posts: 241
ID: 950482
Credit: 23,670,125
RAC: 0
Found 1 prime in the 2018 Tour de Primes321 LLR Gold: Earned 500,000 credits (506,942)Cullen LLR Gold: Earned 500,000 credits (500,523)ESP LLR Gold: Earned 500,000 credits (655,642)Generalized Cullen/Woodall LLR Gold: Earned 500,000 credits (539,100)PPS LLR Gold: Earned 500,000 credits (688,232)PSP LLR Gold: Earned 500,000 credits (561,629)SoB LLR Ruby: Earned 2,000,000 credits (3,659,676)SR5 LLR Gold: Earned 500,000 credits (505,810)SGS LLR Gold: Earned 500,000 credits (506,024)TRP LLR Gold: Earned 500,000 credits (963,625)Woodall LLR Gold: Earned 500,000 credits (506,044)321 Sieve (suspended) Gold: Earned 500,000 credits (511,694)Generalized Cullen/Woodall Sieve (suspended) Gold: Earned 500,000 credits (549,916)PPS Sieve Gold: Earned 500,000 credits (701,168)AP 26/27 Gold: Earned 500,000 credits (525,590)GFN Jade: Earned 10,000,000 credits (10,762,872)WW Gold: Earned 500,000 credits (500,000)PSA Gold: Earned 500,000 credits (525,639)
Message 120224 - Posted: 30 Aug 2018 | 14:14:22 UTC - in response to Message 120220.
Last modified: 30 Aug 2018 | 14:15:09 UTC

I see here: https://primes.utm.edu/nthprime/ using database with 30 trillions... This is good, and I see fast searching N-th prime...
But... There is no consecutive primes lists with this range...

There's no reason to make such lists, just like there is no reason to make a list of "first 30 trillion integers".

For an estimation of total time to make such a list, you can check out the description of the algorithm and the function itself that are provided at that link. Determining the bin the number falls into is pretty much instantaneous, so "might take up to 10 seconds" is just a max estimation of time needed to sieve a bin. If you want to sieve everything, you can sieve all bins in parallel, of course.

Profile Michael GoetzProject donor
Volunteer moderator
Project administrator
Avatar
Send message
Joined: 21 Jan 10
Posts: 13648
ID: 53948
Credit: 285,463,897
RAC: 46,203
The "Shut up already!" badge:  This loud mouth has mansplained on the forums over 10 thousand times!  Sheesh!!!Discovered the World's First GFN-19 prime!!!Discovered 1 mega primeFound 1 prime in the 2018 Tour de PrimesFound 1 prime in the 2019 Tour de PrimesFound 1 prime in the 2020 Tour de PrimesFound 2 primes in the 2021 Tour de Primes321 LLR Turquoise: Earned 5,000,000 credits (5,132,712)Cullen LLR Turquoise: Earned 5,000,000 credits (5,038,114)ESP LLR Turquoise: Earned 5,000,000 credits (6,177,890)Generalized Cullen/Woodall LLR Ruby: Earned 2,000,000 credits (2,435,683)PPS LLR Sapphire: Earned 20,000,000 credits (20,751,038)PSP LLR Turquoise: Earned 5,000,000 credits (7,956,186)SoB LLR Sapphire: Earned 20,000,000 credits (36,067,618)SR5 LLR Jade: Earned 10,000,000 credits (10,007,110)SGS LLR Ruby: Earned 2,000,000 credits (3,718,606)TRP LLR Turquoise: Earned 5,000,000 credits (5,084,329)Woodall LLR Turquoise: Earned 5,000,000 credits (5,032,821)321 Sieve (suspended) Jade: Earned 10,000,000 credits (10,061,196)Cullen/Woodall Sieve (suspended) Ruby: Earned 2,000,000 credits (4,170,256)Generalized Cullen/Woodall Sieve (suspended) Turquoise: Earned 5,000,000 credits (5,059,304)PPS Sieve Sapphire: Earned 20,000,000 credits (22,885,121)Sierpinski (ESP/PSP/SoB) Sieve (suspended) Amethyst: Earned 1,000,000 credits (1,035,522)TRP Sieve (suspended) Ruby: Earned 2,000,000 credits (2,051,121)AP 26/27 Jade: Earned 10,000,000 credits (10,118,303)GFN Emerald: Earned 50,000,000 credits (78,031,938)WW Sapphire: Earned 20,000,000 credits (32,204,000)PSA Jade: Earned 10,000,000 credits (12,445,029)
Message 120225 - Posted: 30 Aug 2018 | 14:39:28 UTC

I've moved this thread to "General". The Sieving forum is for discussing our manual sieving projects.
____________
My lucky number is 75898524288+1

Profile JeppeSNProject donor
Avatar
Send message
Joined: 5 Apr 14
Posts: 1534
ID: 306875
Credit: 35,660,505
RAC: 9,493
Found 1 prime in the 2020 Tour de Primes321 LLR Gold: Earned 500,000 credits (529,293)Cullen LLR Gold: Earned 500,000 credits (611,298)ESP LLR Silver: Earned 100,000 credits (174,818)Generalized Cullen/Woodall LLR Bronze: Earned 10,000 credits (35,236)PPS LLR Jade: Earned 10,000,000 credits (13,193,892)PSP LLR Silver: Earned 100,000 credits (428,457)SoB LLR Silver: Earned 100,000 credits (466,812)SR5 LLR Silver: Earned 100,000 credits (145,419)SGS LLR Silver: Earned 100,000 credits (112,277)TRP LLR Silver: Earned 100,000 credits (342,501)Woodall LLR Silver: Earned 100,000 credits (109,455)321 Sieve (suspended) Silver: Earned 100,000 credits (175,037)PPS Sieve Bronze: Earned 10,000 credits (10,113)AP 26/27 Bronze: Earned 10,000 credits (12,129)GFN Ruby: Earned 2,000,000 credits (2,059,478)WW Turquoise: Earned 5,000,000 credits (9,640,000)PSA Turquoise: Earned 5,000,000 credits (7,614,290)
Message 120227 - Posted: 30 Aug 2018 | 15:53:33 UTC - in response to Message 120220.


It depends on what you mean.
And if you type:
primes([10000000000,10000001000])
you get the answer:
...


But if I type
primes([10000000000,10000010000])

i got an error, because client-side JavaScript calculations there...


Not sure what JavaScript settings their web interface requires. But the prime "calculation" itself is done at the serverside.

So try with some more liberal JavaScript settings. It works for me. Or better, download PARI/GP yourself and paste that function call into the GP "calculator". Not hard to write from GP to a file on your own machine, in that case.

/JeppeSN

A_H_O_H
Send message
Joined: 9 Apr 17
Posts: 25
ID: 819725
Credit: 11,857,204
RAC: 0
PPS Sieve Silver: Earned 100,000 credits (117,985)TRP Sieve (suspended) Bronze: Earned 10,000 credits (19,223)AP 26/27 Turquoise: Earned 5,000,000 credits (8,947,159)GFN Ruby: Earned 2,000,000 credits (2,772,837)
Message 120250 - Posted: 1 Sep 2018 | 1:16:34 UTC - in response to Message 120220.


http://primos.mat.br/

There is primes between 1-st trillion natural numbers...

https://primesznxlfc5ika.onion.top/primes/indexen.html
Here is primes - up to 2 trillions of natural numbers.

Miller-Rabin algorithm working fastly, and have so low errors percentage even with 10 rounds.
Can this be vectorized to using parralel GPU calculations?

A_H_O_H
Send message
Joined: 9 Apr 17
Posts: 25
ID: 819725
Credit: 11,857,204
RAC: 0
PPS Sieve Silver: Earned 100,000 credits (117,985)TRP Sieve (suspended) Bronze: Earned 10,000 credits (19,223)AP 26/27 Turquoise: Earned 5,000,000 credits (8,947,159)GFN Ruby: Earned 2,000,000 credits (2,772,837)
Message 120281 - Posted: 3 Sep 2018 | 0:06:54 UTC - in response to Message 120250.
Last modified: 3 Sep 2018 | 0:17:27 UTC

http://primos.mat.br/ — 1-st trillion natural numbers...
https://primesznxlfc5ika.onion.link/primes/indexen.html — 2-nd trillions.

Miller-Rabin algorithm working fastly, and have so low errors percentage even with 10 rounds.
Can this be vectorized to using parralel GPU calculations?

I have JavaScript implementation of this algoritm, using BigIntegers
But 10 million primes in browser not convenient to generate.

I cann't see vectorized implementation of this algoritm, as portable EXE for windows, to be able for using GPU calculations...
.cu files from github need to be compiled,
python realization need to install python and Numba, pyCuda, and this not portable...
I see, this primesieve...
But there is "Sieve of Eratosthenes", and this need memory,
and cann't save prime numbers as result in the file - before full generate all...

Your project working with GPU calculations...

So.. Can your programmers, just for fun,
make Miller-Rabin algorithm vectorized - to be able GPU parallelism there (CUDA, OpenCL, etc),
like this portable EXE: http://www.naturalnumbers.org/primes.html#generator

I see portable GPU programs, with cuda calculations,
like ccminer-x64.exe (portable GPU miner), vanitygen.exe (vanity bitcoin address generator),
scallion.exe (vanity onion-domain for TOR), etc...
All this programs are portable and working with GPU devices!..

Profile JeppeSNProject donor
Avatar
Send message
Joined: 5 Apr 14
Posts: 1534
ID: 306875
Credit: 35,660,505
RAC: 9,493
Found 1 prime in the 2020 Tour de Primes321 LLR Gold: Earned 500,000 credits (529,293)Cullen LLR Gold: Earned 500,000 credits (611,298)ESP LLR Silver: Earned 100,000 credits (174,818)Generalized Cullen/Woodall LLR Bronze: Earned 10,000 credits (35,236)PPS LLR Jade: Earned 10,000,000 credits (13,193,892)PSP LLR Silver: Earned 100,000 credits (428,457)SoB LLR Silver: Earned 100,000 credits (466,812)SR5 LLR Silver: Earned 100,000 credits (145,419)SGS LLR Silver: Earned 100,000 credits (112,277)TRP LLR Silver: Earned 100,000 credits (342,501)Woodall LLR Silver: Earned 100,000 credits (109,455)321 Sieve (suspended) Silver: Earned 100,000 credits (175,037)PPS Sieve Bronze: Earned 10,000 credits (10,113)AP 26/27 Bronze: Earned 10,000 credits (12,129)GFN Ruby: Earned 2,000,000 credits (2,059,478)WW Turquoise: Earned 5,000,000 credits (9,640,000)PSA Turquoise: Earned 5,000,000 credits (7,614,290)
Message 120284 - Posted: 3 Sep 2018 | 5:52:05 UTC - in response to Message 120281.

With the danger of repeating myself, if you want 10 million primes in a file, with PARI/GP you just type

write("myPrimeList.txt", primes(10^7))
/JeppeSN

Profile x3mEn
Avatar
Send message
Joined: 21 Jul 10
Posts: 353
ID: 64131
Credit: 63,148,858
RAC: 2,362
321 LLR Amethyst: Earned 1,000,000 credits (1,137,410)Cullen LLR Amethyst: Earned 1,000,000 credits (1,005,544)ESP LLR Ruby: Earned 2,000,000 credits (2,006,232)Generalized Cullen/Woodall LLR Ruby: Earned 2,000,000 credits (2,005,199)PPS LLR Turquoise: Earned 5,000,000 credits (5,036,498)PSP LLR Ruby: Earned 2,000,000 credits (2,065,730)SoB LLR Ruby: Earned 2,000,000 credits (2,036,592)SR5 LLR Ruby: Earned 2,000,000 credits (2,008,007)SGS LLR Ruby: Earned 2,000,000 credits (2,001,244)TRP LLR Ruby: Earned 2,000,000 credits (2,002,759)Woodall LLR Amethyst: Earned 1,000,000 credits (1,547,667)321 Sieve (suspended) Ruby: Earned 2,000,000 credits (2,005,104)Cullen/Woodall Sieve (suspended) Ruby: Earned 2,000,000 credits (4,000,304)Generalized Cullen/Woodall Sieve (suspended) Ruby: Earned 2,000,000 credits (2,087,920)PPS Sieve Jade: Earned 10,000,000 credits (11,247,907)Sierpinski (ESP/PSP/SoB) Sieve (suspended) Amethyst: Earned 1,000,000 credits (1,313,121)TRP Sieve (suspended) Amethyst: Earned 1,000,000 credits (1,284,804)AP 26/27 Ruby: Earned 2,000,000 credits (2,001,285)GFN Turquoise: Earned 5,000,000 credits (5,599,058)WW Ruby: Earned 2,000,000 credits (2,000,000)PSA Turquoise: Earned 5,000,000 credits (8,756,474)
Message 120285 - Posted: 3 Sep 2018 | 9:40:05 UTC

Consecutive List Of Primes, 1.02 (Windows 64-bit) Copyright 2018, Alexander Belogourov aka x3mEn Command line parameters : 1 22801763489 -p -f 1000000 Number range borders : from 3 to 22801763489 step 2 Total amount of Numbers : 11400881744 Factoring Block Size : 1000000 Starting date timestamp : 03.09.2018 12:25:03 Elapsed time : 00:04:53.125 Total amount of Primes : 1000000000

A_H_O_H
Send message
Joined: 9 Apr 17
Posts: 25
ID: 819725
Credit: 11,857,204
RAC: 0
PPS Sieve Silver: Earned 100,000 credits (117,985)TRP Sieve (suspended) Bronze: Earned 10,000 credits (19,223)AP 26/27 Turquoise: Earned 5,000,000 credits (8,947,159)GFN Ruby: Earned 2,000,000 credits (2,772,837)
Message 120289 - Posted: 3 Sep 2018 | 12:04:12 UTC - in response to Message 120285.
Last modified: 3 Sep 2018 | 12:52:27 UTC

Consecutive List Of Primes, 1.02 (Windows 64-bit) Copyright 2018, Alexander Belogourov aka x3mEn Command line parameters : 1 22801763489 -p -f 1000000 Number range borders : from 3 to 22801763489 step 2 Total amount of Numbers : 11400881744 Factoring Block Size : 1000000 Starting date timestamp : 03.09.2018 12:25:03 Elapsed time : 00:04:53.125 Total amount of Primes : 1000000000

What is this? Where is this?

As I said, I have consecutive prime numbers, up to 2 trillions of natural numbers.
This is containing 73,301,896,139 prime numbers total, and last prime number is 1,999,999,999,981.
If you want we can compare your primes... But... Tell the link at your lists!

With the danger of repeating myself, if you want 10 million primes in a file, with PARI/GP you just type
write("myPrimeList.txt", primes(10^7))
/JeppeSN

Hehheh... I never not used this program and don't read the documentation...
But... I did download the installer and try this:
write("myPrimeList.txt", primes(10^7))

But I see the error:
*** at top-level: write("myPrimeList.txt",primes(10^7))
*** ^-------------
*** primes: the PARI stack overflows !
current stack size: 8000000 (7.629 Mbytes)
[hint] set 'parisizemax' to a non-zero value in your GPRC

write("myPrimeList.txt", primes(10^6))

Tell me this error too.
write("myPrimeList.txt", primes(10^5))

write("myPrimeList.txt", primes([10000000000,10000010000]))[/quote]
All was been writed successfully... But small range...
write("myPrimeList.txt", primes([2000000000000,2000001000000]))

ERROR.
write("myPrimeList.txt", primes([2000000000000,2000000900000]))

success, but small range...
No one from this examples not tell me consecutive 10M primes...
And I'm not sure what the calculations is made on the GPU...

I'm still confident that the better way to generate consecutive prime numbers - there would be
a compact and portable CUDA-compatible program (like PrimeGen.exe),
with a vectorized and paralleled, this small Miller-Rabin algorithm.


Also, I published the good commented python code of Miller-Rabin generator - here.
This working only on 1 CPU core... No multiprocessing, multithreading, vectorization and parallelizm... =(

Using this code, anyone can make calculation any part of "2T-3T", and upload this on my server.
There is available FOLDER_FOR_UPLOADS in the root directory of the server.
You can drop there a torrent-file, for example.

Profile x3mEn
Avatar
Send message
Joined: 21 Jul 10
Posts: 353
ID: 64131
Credit: 63,148,858
RAC: 2,362
321 LLR Amethyst: Earned 1,000,000 credits (1,137,410)Cullen LLR Amethyst: Earned 1,000,000 credits (1,005,544)ESP LLR Ruby: Earned 2,000,000 credits (2,006,232)Generalized Cullen/Woodall LLR Ruby: Earned 2,000,000 credits (2,005,199)PPS LLR Turquoise: Earned 5,000,000 credits (5,036,498)PSP LLR Ruby: Earned 2,000,000 credits (2,065,730)SoB LLR Ruby: Earned 2,000,000 credits (2,036,592)SR5 LLR Ruby: Earned 2,000,000 credits (2,008,007)SGS LLR Ruby: Earned 2,000,000 credits (2,001,244)TRP LLR Ruby: Earned 2,000,000 credits (2,002,759)Woodall LLR Amethyst: Earned 1,000,000 credits (1,547,667)321 Sieve (suspended) Ruby: Earned 2,000,000 credits (2,005,104)Cullen/Woodall Sieve (suspended) Ruby: Earned 2,000,000 credits (4,000,304)Generalized Cullen/Woodall Sieve (suspended) Ruby: Earned 2,000,000 credits (2,087,920)PPS Sieve Jade: Earned 10,000,000 credits (11,247,907)Sierpinski (ESP/PSP/SoB) Sieve (suspended) Amethyst: Earned 1,000,000 credits (1,313,121)TRP Sieve (suspended) Amethyst: Earned 1,000,000 credits (1,284,804)AP 26/27 Ruby: Earned 2,000,000 credits (2,001,285)GFN Turquoise: Earned 5,000,000 credits (5,599,058)WW Ruby: Earned 2,000,000 credits (2,000,000)PSA Turquoise: Earned 5,000,000 credits (8,756,474)
Message 120290 - Posted: 3 Sep 2018 | 13:08:33 UTC

Consecutive List Of Primes, 1.02 (Windows 64-bit) Copyright 2018, Alexander Belogourov aka x3mEn Command line parameters : 2000000000000 2001000000000 -o -p -f 10000000 Number range borders : from 2000000000001 to 2000999999999 step 2 Total amount of Numbers : 500000000 Factoring Block Size : 10000000 Starting date timestamp : 03.09.2018 15:54:39 Elapsed time : 00:00:28.132 Total amount of Primes : 35303851 2000000000003 2000000000123 2000000000137 2000000000153 2000000000179 ... 2000999999891 2000999999903 2000999999909 2000999999939 2000999999951


What is this?

I said "Ok, the challenge accepted" and yesterday had wrote the application (to be honest, not from the scratch).

Where is this?

I published the project in Github here.
You can use it at your own risk, but remember, the code is not verified so may contain mistakes.

A_H_O_H
Send message
Joined: 9 Apr 17
Posts: 25
ID: 819725
Credit: 11,857,204
RAC: 0
PPS Sieve Silver: Earned 100,000 credits (117,985)TRP Sieve (suspended) Bronze: Earned 10,000 credits (19,223)AP 26/27 Turquoise: Earned 5,000,000 credits (8,947,159)GFN Ruby: Earned 2,000,000 credits (2,772,837)
Message 120291 - Posted: 3 Sep 2018 | 13:36:41 UTC - in response to Message 120290.
Last modified: 3 Sep 2018 | 13:41:25 UTC

I published the project in Github here.

I see there is only .c and .cbp file... Do you have compiled portable exe? Can you publish this in releases, as a zip archive?

You can use it at your own risk, but remember, the code is not verified so may contain mistakes.

Not problem, I can re-check results from this generator again...
But if this program not have multithreading, multiprocessing
or if code not vectorized to supporting parallel GPU calculations,
so no make any sense to compile and use this,
because my published python-Miller-rabin generator
working not a slowly even on 1 CPU core...

Profile x3mEn
Avatar
Send message
Joined: 21 Jul 10
Posts: 353
ID: 64131
Credit: 63,148,858
RAC: 2,362
321 LLR Amethyst: Earned 1,000,000 credits (1,137,410)Cullen LLR Amethyst: Earned 1,000,000 credits (1,005,544)ESP LLR Ruby: Earned 2,000,000 credits (2,006,232)Generalized Cullen/Woodall LLR Ruby: Earned 2,000,000 credits (2,005,199)PPS LLR Turquoise: Earned 5,000,000 credits (5,036,498)PSP LLR Ruby: Earned 2,000,000 credits (2,065,730)SoB LLR Ruby: Earned 2,000,000 credits (2,036,592)SR5 LLR Ruby: Earned 2,000,000 credits (2,008,007)SGS LLR Ruby: Earned 2,000,000 credits (2,001,244)TRP LLR Ruby: Earned 2,000,000 credits (2,002,759)Woodall LLR Amethyst: Earned 1,000,000 credits (1,547,667)321 Sieve (suspended) Ruby: Earned 2,000,000 credits (2,005,104)Cullen/Woodall Sieve (suspended) Ruby: Earned 2,000,000 credits (4,000,304)Generalized Cullen/Woodall Sieve (suspended) Ruby: Earned 2,000,000 credits (2,087,920)PPS Sieve Jade: Earned 10,000,000 credits (11,247,907)Sierpinski (ESP/PSP/SoB) Sieve (suspended) Amethyst: Earned 1,000,000 credits (1,313,121)TRP Sieve (suspended) Amethyst: Earned 1,000,000 credits (1,284,804)AP 26/27 Ruby: Earned 2,000,000 credits (2,001,285)GFN Turquoise: Earned 5,000,000 credits (5,599,058)WW Ruby: Earned 2,000,000 credits (2,000,000)PSA Turquoise: Earned 5,000,000 credits (8,756,474)
Message 120292 - Posted: 3 Sep 2018 | 13:51:55 UTC - in response to Message 120291.

But if this program not have multithreading, multiprocessing
or if code not vectorized to supporting parallel GPU calculations

Excuse, you're asking a liitle too much.

Profile JeppeSNProject donor
Avatar
Send message
Joined: 5 Apr 14
Posts: 1534
ID: 306875
Credit: 35,660,505
RAC: 9,493
Found 1 prime in the 2020 Tour de Primes321 LLR Gold: Earned 500,000 credits (529,293)Cullen LLR Gold: Earned 500,000 credits (611,298)ESP LLR Silver: Earned 100,000 credits (174,818)Generalized Cullen/Woodall LLR Bronze: Earned 10,000 credits (35,236)PPS LLR Jade: Earned 10,000,000 credits (13,193,892)PSP LLR Silver: Earned 100,000 credits (428,457)SoB LLR Silver: Earned 100,000 credits (466,812)SR5 LLR Silver: Earned 100,000 credits (145,419)SGS LLR Silver: Earned 100,000 credits (112,277)TRP LLR Silver: Earned 100,000 credits (342,501)Woodall LLR Silver: Earned 100,000 credits (109,455)321 Sieve (suspended) Silver: Earned 100,000 credits (175,037)PPS Sieve Bronze: Earned 10,000 credits (10,113)AP 26/27 Bronze: Earned 10,000 credits (12,129)GFN Ruby: Earned 2,000,000 credits (2,059,478)WW Turquoise: Earned 5,000,000 credits (9,640,000)PSA Turquoise: Earned 5,000,000 credits (7,614,290)
Message 120294 - Posted: 3 Sep 2018 | 15:47:30 UTC - in response to Message 120289.

Hehheh... I never not used this program and don't read the documentation...
But... I did download the installer and try this:
write("myPrimeList.txt", primes(10^7))

But I see the error:
*** at top-level: write("myPrimeList.txt",primes(10^7))
*** ^-------------
*** primes: the PARI stack overflows !
current stack size: 8000000 (7.629 Mbytes)
[hint] set 'parisizemax' to a non-zero value in your GPRC



That hint is good. The stack size of 8 million bytes is insufficient, so you want to allow PARI to increase its own stack. To do it in just this session, you can type
default(parisizemax, 6G)

which will allow PARI to increase its own stack size, but never to more than 6 billion bytes. Same as default(parisizemax, 6*10^9).

After that you can run write("myPrimeList.txt",primes(10^7)) as I suggested.

If you want to set parisizemax automatically, you can edit the "GPRC" file. It is shown at startup which file that is, but it may be:
C:\Program Files (x86)\Pari64-2-11-0\gprc.txt

depending on your OS and installation folder. Edit the file with a text editor (like Notepad) which is "Run as administrator". Insert these lines, for example:
parisizemax = 6G primelimit = 100M

The primelimit thing in the GPRC file will determine the size of a pre-calculated list of primes the PARI uses for some purposes.

/JeppeSN

A_H_O_H
Send message
Joined: 9 Apr 17
Posts: 25
ID: 819725
Credit: 11,857,204
RAC: 0
PPS Sieve Silver: Earned 100,000 credits (117,985)TRP Sieve (suspended) Bronze: Earned 10,000 credits (19,223)AP 26/27 Turquoise: Earned 5,000,000 credits (8,947,159)GFN Ruby: Earned 2,000,000 credits (2,772,837)
Message 120295 - Posted: 3 Sep 2018 | 15:52:15 UTC - in response to Message 120289.
Last modified: 3 Sep 2018 | 16:49:21 UTC

repeating myself, if you want 10 million primes in a file,
with PARI/GP
you just type
write("myPrimeList.txt", primes(10^7))
/JeppeSN


write("myPrimeList.txt", primes(10^7))

But I see the error:
*** at top-level: write("myPrimeList.txt",primes(10^7))
*** ^-------------
*** primes: the PARI stack overflows !
current stack size: 8000000 (7.629 Mbytes)
[hint] set 'parisizemax' to a non-zero value in your GPRC

write("myPrimeList.txt", primes(10^6))

Tell me this error too.
write("myPrimeList.txt", primes(10^5))

write("myPrimeList.txt", primes([10000000000,10000010000]))
All was been writed successfully... But small range...
write("myPrimeList.txt", primes([2000000000000,2000001000000]))

ERROR.
write("myPrimeList.txt", primes([2000000000000,2000000900000]))

success, but small range...
No one from this examples not tell me consecutive 10M primes...
And I'm not sure what the calculations is made on the GPU...


I did solve the problem with stack overflows by using command:
allocatemem(2^28)
*** allocatemem: Warning: new stack size = 268435456 (256.000 Mbytes).

Then, available the command:
write("myPrimeList.txt", primes([2000000000000,2000030000000]))

Without any errors...

But, inside the file, there is a prime numbers in one row.
Can I specify delimiters for rows,
delimiter between prime numbers in the row,
and number of primes in one row??

Also, I don't see GPU power loading, when this working...



default(parisizemax, 6G)

C:\Program Files (x86)\Pari64-2-11-0\gprc.txt

parisizemax = 6G primelimit = 100M


This not working without
allocatemem(2^28)...


write("myPrimeList.txt", primes([2000000000000,2000030000000]))

*** primes: Warning: increasing stack size to 16000000.
*** primes: Warning: increasing stack size to 32000000.
*** primes: Warning: increasing stack size to 64000000.
*** primes: Warning: increasing stack size to 128000000.
*** primes: Warning: increasing stack size to 256000000.
*** primes: Warning: increasing stack size to 512000000.


And after run
allocatemem(2^28)...

I see the same errors, but file is generating...

Also, I want to using sapararors, like there is in this file
10 prime numbers in row through TAB, then new string...
Is this possible by using PARI/GP??

A_H_O_H
Send message
Joined: 9 Apr 17
Posts: 25
ID: 819725
Credit: 11,857,204
RAC: 0
PPS Sieve Silver: Earned 100,000 credits (117,985)TRP Sieve (suspended) Bronze: Earned 10,000 credits (19,223)AP 26/27 Turquoise: Earned 5,000,000 credits (8,947,159)GFN Ruby: Earned 2,000,000 credits (2,772,837)
Message 120296 - Posted: 3 Sep 2018 | 17:06:17 UTC - in response to Message 120294.
Last modified: 3 Sep 2018 | 17:21:53 UTC

Hm... I cann't write allocatemem(2^30) in gprc.txt
so I using next way to fix errors...

This way is a four consecutive commands:

gp > allocatemem(2^30)
*** Warning: new stack size = 1073741824 (1024.000 Mbytes).
gp > default(parisizemax, 6G)
*** Warning: new maximum stack size = 6000000000 (5722.046 Mbytes).
gp > default(primelimit, 400M)
gp > write("myPrimeList.txt", primes([2000000000000,2000040000000]))
gp >


And no any errors then...
Each 10 million of prime numbers, in range [2 trillions - 3 trillions]
are contains in range between 300M natural numbers,
so 400 millions can be can be enough for finding this all...

But... What about separators in PARI/GP?? '\t' and '\r\n' need to using in txt file...

Profile JeppeSNProject donor
Avatar
Send message
Joined: 5 Apr 14
Posts: 1534
ID: 306875
Credit: 35,660,505
RAC: 9,493
Found 1 prime in the 2020 Tour de Primes321 LLR Gold: Earned 500,000 credits (529,293)Cullen LLR Gold: Earned 500,000 credits (611,298)ESP LLR Silver: Earned 100,000 credits (174,818)Generalized Cullen/Woodall LLR Bronze: Earned 10,000 credits (35,236)PPS LLR Jade: Earned 10,000,000 credits (13,193,892)PSP LLR Silver: Earned 100,000 credits (428,457)SoB LLR Silver: Earned 100,000 credits (466,812)SR5 LLR Silver: Earned 100,000 credits (145,419)SGS LLR Silver: Earned 100,000 credits (112,277)TRP LLR Silver: Earned 100,000 credits (342,501)Woodall LLR Silver: Earned 100,000 credits (109,455)321 Sieve (suspended) Silver: Earned 100,000 credits (175,037)PPS Sieve Bronze: Earned 10,000 credits (10,113)AP 26/27 Bronze: Earned 10,000 credits (12,129)GFN Ruby: Earned 2,000,000 credits (2,059,478)WW Turquoise: Earned 5,000,000 credits (9,640,000)PSA Turquoise: Earned 5,000,000 credits (7,614,290)
Message 120299 - Posted: 3 Sep 2018 | 19:45:45 UTC - in response to Message 120295.


Also, I don't see GPU power loading, when this working...


This is not a GPU app. It will not use the GPU.


10 prime numbers in row through TAB, then new string...
Is this possible by using PARI/GP??


You can write programs in PARI/GP. Here is a primitive program:
n=0;s="";forprime(p=10^6,10^7,n++;s=Str(s,p,if(n % 10 != 0,"\t","\n"));if(n % 10^3 == 0, write1("myFile.txt",s);s=""));write("myFile.txt",s)

It will iterate through all primes between 10^6 and 10^7, counting them with n. The variable s is a string that is built with TAB, or every tenth time with NEWLINE. For every 10^3 number, s is appended to file "myFile.txt" and s is reset. This program is slow and spends all the time with string operations and file operations. You can probably do it in a better way.

Your issues with parisizemax I do not understand. The intended meaning is that if parisizemax is e.g. 6000000000, then PARI will increase its own stack "on the fly", when needed, writing "Warning: increasing stack size to ..." in red, but going on with its tasks. Only if a size over 6 billion (in this example) is needed, will an error be issued.

/JeppeSN

Profile Eudy SilvaProject donor
Avatar
Send message
Joined: 26 Aug 17
Posts: 1543
ID: 918937
Credit: 342,052,559
RAC: 187,826
Discovered 2 mega primesFound 2 primes in the 2018 Tour de PrimesFound 1 prime in the 2019 Tour de PrimesFound 1 prime in the 2020 Tour de PrimesFound 1 prime in the 2021 Tour de Primes321 LLR Amethyst: Earned 1,000,000 credits (1,012,503)Cullen LLR Amethyst: Earned 1,000,000 credits (1,291,013)ESP LLR Amethyst: Earned 1,000,000 credits (1,151,976)Generalized Cullen/Woodall LLR Amethyst: Earned 1,000,000 credits (1,004,746)PPS LLR Sapphire: Earned 20,000,000 credits (20,014,581)PSP LLR Amethyst: Earned 1,000,000 credits (1,476,639)SoB LLR Ruby: Earned 2,000,000 credits (2,432,091)SR5 LLR Ruby: Earned 2,000,000 credits (2,954,518)SGS LLR Amethyst: Earned 1,000,000 credits (1,462,951)TRP LLR Amethyst: Earned 1,000,000 credits (1,574,163)Woodall LLR Amethyst: Earned 1,000,000 credits (1,001,901)321 Sieve (suspended) Amethyst: Earned 1,000,000 credits (1,119,749)Generalized Cullen/Woodall Sieve (suspended) Amethyst: Earned 1,000,000 credits (1,005,331)PPS Sieve Emerald: Earned 50,000,000 credits (68,690,867)AP 26/27 Emerald: Earned 50,000,000 credits (50,096,813)GFN Emerald: Earned 50,000,000 credits (79,692,417)WW Double Bronze: Earned 100,000,000 credits (104,012,000)PSA Ruby: Earned 2,000,000 credits (2,059,222)
Message 120300 - Posted: 3 Sep 2018 | 20:39:31 UTC

A_H_O_H, have you seen this ?

https://primesieve.org/

"About
primesieve is a free software program and C/C++ library that generates primes using a highly
optimized sieve of Eratosthenes implementation. It counts the primes below 10^10 in just
0.45 seconds on an Intel Core i7-6700 CPU (4 x 3.4 GHz). primesieve can generate primes
and prime k‑tuplets up to 2^64."
____________
"Accidit in puncto, quod non contingit in anno."
Something that does not occur in a year may, perchance, happen in a moment.

A_H_O_H
Send message
Joined: 9 Apr 17
Posts: 25
ID: 819725
Credit: 11,857,204
RAC: 0
PPS Sieve Silver: Earned 100,000 credits (117,985)TRP Sieve (suspended) Bronze: Earned 10,000 credits (19,223)AP 26/27 Turquoise: Earned 5,000,000 credits (8,947,159)GFN Ruby: Earned 2,000,000 credits (2,772,837)
Message 120301 - Posted: 3 Sep 2018 | 22:45:59 UTC - in response to Message 120299.
Last modified: 3 Sep 2018 | 22:49:02 UTC

Also, I don't see GPU power loading, when this working...

This is not a GPU app. It will not use the GPU.

Ok, but there is multiprocessing and multithreading.
So this PARI/GP prime generator really working faster.


10 prime numbers in row through TAB, then new string...
Is this possible by using PARI/GP??

You can write programs in PARI/GP. Here is a primitive program:
n=0;s="";forprime(p=10^6,10^7,n++;s=Str(s,p,if(n % 10 != 0,"\t","\n"));if(n % 10^3 == 0, write1("myFile.txt",s);s=""));write("myFile.txt",s)


Nice! Thanks! Your idea to write each 1000 primes using write1 function is very good.
I don't see stack overflows errors in this case,
and no need to using allocatemem(2^30), default(parisizemax, 6G) and default(primelimit, 400M)

So I did write this:
folder="C:\\Python Portable\\PariGPprimes";blockname="2T-3T";part=1;n=0;s="";forprime(p=2000000000000,3000000000000,n++;s=Str(s,p,if(n % 10 != 0,"\t","\n"));if(n % 10^3 == 0, write1(Str(folder,"\\",blockname,"_part",part,".txt"),s);s="");if(n%10000000==0, part++));

and this 7z.bat to zip all txt-files:
for %%X in ("C:\Python Portable\PariGPprimes\*.txt") do "C:\Program Files\7-Zip\7z.exe" a "%%~nX.7z" "%%X"

I have still runned Miller-Rabin generator on python too, and I'll see that's working slowly...
So I'll unpack all txt parts - after compare hashes, using portable MultiHasher 2.9.
[/quote]

Your issues with parisizemax I do not understand.
The intended meaning is that if parisizemax is e.g. 6000000000, then PARI will increase its own stack "on the fly",
when needed, writing "Warning: increasing stack size to ..." in red, but going on with its tasks.
Only if a size over 6 billion (in this example) is needed, will an error be issued.

Ok, just I saw stack overflows errors
when allocatemem(2^30) was not been inserted before commands:
default(parisizemax, 6G) and default(primelimit, 400M)
but program really continued working and successfully finished.
And even there was been an errors, I got full file, using command:
write("myPrimeList.txt", primes([2000000000000,2000040000000]))

A_H_O_H, have you seen this ?
https://primesieve.org/

Yea, I saw, this is compact program without GPU supporting, and this working fastly...
But... I don't see there an option, to write primes in the file directly, or partial,
like here, using PARI/GP (each 1000 primes)...

I did try to generate 10M primes there, and I see need to wait this.
Maybe all primes go to RAM and contains here before finishing generate process. :D

Profile Eudy SilvaProject donor
Avatar
Send message
Joined: 26 Aug 17
Posts: 1543
ID: 918937
Credit: 342,052,559
RAC: 187,826
Discovered 2 mega primesFound 2 primes in the 2018 Tour de PrimesFound 1 prime in the 2019 Tour de PrimesFound 1 prime in the 2020 Tour de PrimesFound 1 prime in the 2021 Tour de Primes321 LLR Amethyst: Earned 1,000,000 credits (1,012,503)Cullen LLR Amethyst: Earned 1,000,000 credits (1,291,013)ESP LLR Amethyst: Earned 1,000,000 credits (1,151,976)Generalized Cullen/Woodall LLR Amethyst: Earned 1,000,000 credits (1,004,746)PPS LLR Sapphire: Earned 20,000,000 credits (20,014,581)PSP LLR Amethyst: Earned 1,000,000 credits (1,476,639)SoB LLR Ruby: Earned 2,000,000 credits (2,432,091)SR5 LLR Ruby: Earned 2,000,000 credits (2,954,518)SGS LLR Amethyst: Earned 1,000,000 credits (1,462,951)TRP LLR Amethyst: Earned 1,000,000 credits (1,574,163)Woodall LLR Amethyst: Earned 1,000,000 credits (1,001,901)321 Sieve (suspended) Amethyst: Earned 1,000,000 credits (1,119,749)Generalized Cullen/Woodall Sieve (suspended) Amethyst: Earned 1,000,000 credits (1,005,331)PPS Sieve Emerald: Earned 50,000,000 credits (68,690,867)AP 26/27 Emerald: Earned 50,000,000 credits (50,096,813)GFN Emerald: Earned 50,000,000 credits (79,692,417)WW Double Bronze: Earned 100,000,000 credits (104,012,000)PSA Ruby: Earned 2,000,000 credits (2,059,222)
Message 120302 - Posted: 4 Sep 2018 | 1:13:21 UTC - in response to Message 120301.

A_H_O_H wrote:
... But... I don't see there an option, to write primes in the file directly, or partial ...

One way is to use the console version, with the corresponding parameter to print the primes and redirect the output to a file:

primesieve 10e6 -p > primes.txt


____________
"Accidit in puncto, quod non contingit in anno."
Something that does not occur in a year may, perchance, happen in a moment.

A_H_O_H
Send message
Joined: 9 Apr 17
Posts: 25
ID: 819725
Credit: 11,857,204
RAC: 0
PPS Sieve Silver: Earned 100,000 credits (117,985)TRP Sieve (suspended) Bronze: Earned 10,000 credits (19,223)AP 26/27 Turquoise: Earned 5,000,000 credits (8,947,159)GFN Ruby: Earned 2,000,000 credits (2,772,837)
Message 120310 - Posted: 4 Sep 2018 | 15:13:04 UTC - in response to Message 120302.

[quote]

A_H_O_H wrote:

primesieve 10e6 -p > primes.txt

Any delimiters can be specified?

Profile Eudy SilvaProject donor
Avatar
Send message
Joined: 26 Aug 17
Posts: 1543
ID: 918937
Credit: 342,052,559
RAC: 187,826
Discovered 2 mega primesFound 2 primes in the 2018 Tour de PrimesFound 1 prime in the 2019 Tour de PrimesFound 1 prime in the 2020 Tour de PrimesFound 1 prime in the 2021 Tour de Primes321 LLR Amethyst: Earned 1,000,000 credits (1,012,503)Cullen LLR Amethyst: Earned 1,000,000 credits (1,291,013)ESP LLR Amethyst: Earned 1,000,000 credits (1,151,976)Generalized Cullen/Woodall LLR Amethyst: Earned 1,000,000 credits (1,004,746)PPS LLR Sapphire: Earned 20,000,000 credits (20,014,581)PSP LLR Amethyst: Earned 1,000,000 credits (1,476,639)SoB LLR Ruby: Earned 2,000,000 credits (2,432,091)SR5 LLR Ruby: Earned 2,000,000 credits (2,954,518)SGS LLR Amethyst: Earned 1,000,000 credits (1,462,951)TRP LLR Amethyst: Earned 1,000,000 credits (1,574,163)Woodall LLR Amethyst: Earned 1,000,000 credits (1,001,901)321 Sieve (suspended) Amethyst: Earned 1,000,000 credits (1,119,749)Generalized Cullen/Woodall Sieve (suspended) Amethyst: Earned 1,000,000 credits (1,005,331)PPS Sieve Emerald: Earned 50,000,000 credits (68,690,867)AP 26/27 Emerald: Earned 50,000,000 credits (50,096,813)GFN Emerald: Earned 50,000,000 credits (79,692,417)WW Double Bronze: Earned 100,000,000 credits (104,012,000)PSA Ruby: Earned 2,000,000 credits (2,059,222)
Message 120311 - Posted: 4 Sep 2018 | 15:30:42 UTC - in response to Message 120310.

primesieve.exe --help Usage: primesieve [START] STOP [OPTION]... Generate the primes and/or prime k-tuplets inside [START, STOP] (< 2^64) using the segmented sieve of Eratosthenes. Options: -c[N+], --count[=N+] Count primes and prime k-tuplets, N <= 6, e.g. -c1 primes, -c2 twins, -c3 triplets, ... --cpu-info Print CPU information -d<N>, --dist=<N> Sieve the interval [START, START + N] -h, --help Print this help menu -n, --nth-prime Calculate the nth prime, e.g. 1 100 -n finds the 1st prime > 100 --no-status Turn off the progressing status -p[N], --print[=N] Print primes or prime k-tuplets, N <= 6, e.g. -p1 primes, -p2 twins, -p3 triplets, ... -q, --quiet Quiet mode, prints less output -s<N>, --size=<N> Set the sieve size in KiB, N <= 4096 -t<N>, --threads=<N> Set the number of threads, N <= CPU cores --time Print the time elapsed in seconds -v, --version Print version and license information Examples: primesieve 1000 Count the primes below 1000 primesieve 1000 -c2 Count the twin primes below 1000 primesieve 1e6 -p Print the primes below 10^6 primesieve 100 200 -p Print the primes inside [100, 200]


____________
"Accidit in puncto, quod non contingit in anno."
Something that does not occur in a year may, perchance, happen in a moment.

A_H_O_H
Send message
Joined: 9 Apr 17
Posts: 25
ID: 819725
Credit: 11,857,204
RAC: 0
PPS Sieve Silver: Earned 100,000 credits (117,985)TRP Sieve (suspended) Bronze: Earned 10,000 credits (19,223)AP 26/27 Turquoise: Earned 5,000,000 credits (8,947,159)GFN Ruby: Earned 2,000,000 credits (2,772,837)
Message 120313 - Posted: 4 Sep 2018 | 16:14:37 UTC - in response to Message 120311.

I did try -help too, and don't see any delimiters to specify there.
I can rebuild txt files, using python, but this program using CPU calculations.

Profile Eudy SilvaProject donor
Avatar
Send message
Joined: 26 Aug 17
Posts: 1543
ID: 918937
Credit: 342,052,559
RAC: 187,826
Discovered 2 mega primesFound 2 primes in the 2018 Tour de PrimesFound 1 prime in the 2019 Tour de PrimesFound 1 prime in the 2020 Tour de PrimesFound 1 prime in the 2021 Tour de Primes321 LLR Amethyst: Earned 1,000,000 credits (1,012,503)Cullen LLR Amethyst: Earned 1,000,000 credits (1,291,013)ESP LLR Amethyst: Earned 1,000,000 credits (1,151,976)Generalized Cullen/Woodall LLR Amethyst: Earned 1,000,000 credits (1,004,746)PPS LLR Sapphire: Earned 20,000,000 credits (20,014,581)PSP LLR Amethyst: Earned 1,000,000 credits (1,476,639)SoB LLR Ruby: Earned 2,000,000 credits (2,432,091)SR5 LLR Ruby: Earned 2,000,000 credits (2,954,518)SGS LLR Amethyst: Earned 1,000,000 credits (1,462,951)TRP LLR Amethyst: Earned 1,000,000 credits (1,574,163)Woodall LLR Amethyst: Earned 1,000,000 credits (1,001,901)321 Sieve (suspended) Amethyst: Earned 1,000,000 credits (1,119,749)Generalized Cullen/Woodall Sieve (suspended) Amethyst: Earned 1,000,000 credits (1,005,331)PPS Sieve Emerald: Earned 50,000,000 credits (68,690,867)AP 26/27 Emerald: Earned 50,000,000 credits (50,096,813)GFN Emerald: Earned 50,000,000 credits (79,692,417)WW Double Bronze: Earned 100,000,000 credits (104,012,000)PSA Ruby: Earned 2,000,000 credits (2,059,222)
Message 120316 - Posted: 4 Sep 2018 | 16:35:51 UTC - in response to Message 120313.

I believe that START and STOP might do what you want.
(I haven't tried it.)

primesieve 100 200 -p Print the primes inside [100, 200]
____________
"Accidit in puncto, quod non contingit in anno."
Something that does not occur in a year may, perchance, happen in a moment.

Profile x3mEn
Avatar
Send message
Joined: 21 Jul 10
Posts: 353
ID: 64131
Credit: 63,148,858
RAC: 2,362
321 LLR Amethyst: Earned 1,000,000 credits (1,137,410)Cullen LLR Amethyst: Earned 1,000,000 credits (1,005,544)ESP LLR Ruby: Earned 2,000,000 credits (2,006,232)Generalized Cullen/Woodall LLR Ruby: Earned 2,000,000 credits (2,005,199)PPS LLR Turquoise: Earned 5,000,000 credits (5,036,498)PSP LLR Ruby: Earned 2,000,000 credits (2,065,730)SoB LLR Ruby: Earned 2,000,000 credits (2,036,592)SR5 LLR Ruby: Earned 2,000,000 credits (2,008,007)SGS LLR Ruby: Earned 2,000,000 credits (2,001,244)TRP LLR Ruby: Earned 2,000,000 credits (2,002,759)Woodall LLR Amethyst: Earned 1,000,000 credits (1,547,667)321 Sieve (suspended) Ruby: Earned 2,000,000 credits (2,005,104)Cullen/Woodall Sieve (suspended) Ruby: Earned 2,000,000 credits (4,000,304)Generalized Cullen/Woodall Sieve (suspended) Ruby: Earned 2,000,000 credits (2,087,920)PPS Sieve Jade: Earned 10,000,000 credits (11,247,907)Sierpinski (ESP/PSP/SoB) Sieve (suspended) Amethyst: Earned 1,000,000 credits (1,313,121)TRP Sieve (suspended) Amethyst: Earned 1,000,000 credits (1,284,804)AP 26/27 Ruby: Earned 2,000,000 credits (2,001,285)GFN Turquoise: Earned 5,000,000 credits (5,599,058)WW Ruby: Earned 2,000,000 credits (2,000,000)PSA Turquoise: Earned 5,000,000 credits (8,756,474)
Message 120317 - Posted: 4 Sep 2018 | 16:55:25 UTC

try

primesieve 10e6 -p | sed -r 's/\, |\[|\]/\n/g' | tail -n +2 | head -n -1 > primes.txt

A_H_O_H
Send message
Joined: 9 Apr 17
Posts: 25
ID: 819725
Credit: 11,857,204
RAC: 0
PPS Sieve Silver: Earned 100,000 credits (117,985)TRP Sieve (suspended) Bronze: Earned 10,000 credits (19,223)AP 26/27 Turquoise: Earned 5,000,000 credits (8,947,159)GFN Ruby: Earned 2,000,000 credits (2,772,837)
Message 120318 - Posted: 4 Sep 2018 | 16:59:55 UTC - in response to Message 120317.
Last modified: 4 Sep 2018 | 17:01:14 UTC

try
primesieve 10e6 -p | sed -r 's/\, |\[|\]/\n/g' | tail -n +2 | head -n -1 > primes.txt


Incorrect sed.

Profile x3mEn
Avatar
Send message
Joined: 21 Jul 10
Posts: 353
ID: 64131
Credit: 63,148,858
RAC: 2,362
321 LLR Amethyst: Earned 1,000,000 credits (1,137,410)Cullen LLR Amethyst: Earned 1,000,000 credits (1,005,544)ESP LLR Ruby: Earned 2,000,000 credits (2,006,232)Generalized Cullen/Woodall LLR Ruby: Earned 2,000,000 credits (2,005,199)PPS LLR Turquoise: Earned 5,000,000 credits (5,036,498)PSP LLR Ruby: Earned 2,000,000 credits (2,065,730)SoB LLR Ruby: Earned 2,000,000 credits (2,036,592)SR5 LLR Ruby: Earned 2,000,000 credits (2,008,007)SGS LLR Ruby: Earned 2,000,000 credits (2,001,244)TRP LLR Ruby: Earned 2,000,000 credits (2,002,759)Woodall LLR Amethyst: Earned 1,000,000 credits (1,547,667)321 Sieve (suspended) Ruby: Earned 2,000,000 credits (2,005,104)Cullen/Woodall Sieve (suspended) Ruby: Earned 2,000,000 credits (4,000,304)Generalized Cullen/Woodall Sieve (suspended) Ruby: Earned 2,000,000 credits (2,087,920)PPS Sieve Jade: Earned 10,000,000 credits (11,247,907)Sierpinski (ESP/PSP/SoB) Sieve (suspended) Amethyst: Earned 1,000,000 credits (1,313,121)TRP Sieve (suspended) Amethyst: Earned 1,000,000 credits (1,284,804)AP 26/27 Ruby: Earned 2,000,000 credits (2,001,285)GFN Turquoise: Earned 5,000,000 credits (5,599,058)WW Ruby: Earned 2,000,000 credits (2,000,000)PSA Turquoise: Earned 5,000,000 credits (8,756,474)
Message 120322 - Posted: 4 Sep 2018 | 19:15:58 UTC - in response to Message 120318.


Incorrect sed.

You can download sed for your OS.
tail and head are also bash utils, you can also download them or skip at all, they were inserted just to remove excess line breaks.

A_H_O_H
Send message
Joined: 9 Apr 17
Posts: 25
ID: 819725
Credit: 11,857,204
RAC: 0
PPS Sieve Silver: Earned 100,000 credits (117,985)TRP Sieve (suspended) Bronze: Earned 10,000 credits (19,223)AP 26/27 Turquoise: Earned 5,000,000 credits (8,947,159)GFN Ruby: Earned 2,000,000 credits (2,772,837)
Message 120327 - Posted: 4 Sep 2018 | 22:46:49 UTC
Last modified: 4 Sep 2018 | 23:32:18 UTC

So, the best way now, to generate the txt-parts, like there is on http://primos.mat.br
is this way:

1. Download PARI/GP (Pari64-2-11-0.exe)
2. Install this.
3. Run gp.exe with administrator permissions.
4. Switch keyboard layout to english (EN)
5. paste this code there (one string!):

folder="C:\\Pari64-2-11-0\\data";blockname="2T-3T";part=424;n=0;s="";forprime(p=2119935706183,3000000000000,n++;s=Str(s,p,if(n % 10 != 0,"\t","\n"));if(n % 10^3 == 0, write1(Str(folder,"\\",blockname,"_part",part,".txt"),s);s="");if(n%10000000==0, part++));

6.
In this string need to set two parameters - number of the part and first prime p.
Fist prime can be calulated fastly, because PrimePi(2T) = 73,301,896,139, and +10 millions primes in each part.
So (73,301,896,139+1) + (424-1)*10,000,000 = 73,301,896,140 + 4,230,000,000 = 77531896140 - and this is first prime N for the part 424.
Then, can be available N-th prime here: https://primes.utm.edu/nthprime/index.php?n=77531896140
and this have the value 2,119,935,706,183 (2119935706183).
So this prime number, as result can be used as start prime p for any another part.

As result from start part can be generated many parts.
Each part contains 10M primes,
10 primes in row through '\t' delimiter (0x09),
and 1 million string in each part, through delimiter '\n' (0x0d, 0x0a).


To fast pack many parts in txt format -> to archive, using 7z, can be used a bat-file, with code:
for %%X in ("full_patheway_for_folder_with_txt_parts\*.txt") do "full_pathway_to_7z_folder\7z.exe" a "%%~nX.7z" "%%X"

In this case will be generated many 7z archives near all txt-parts.

After all this work can be paralleled, using many computers and processors,
with comparation of the hashes for the parts.

Pari/GP return me the parts with equal SHA512 hashes (this was been compared with parts generated by my python scrypt),
but PARI/GP generate parts faster. This is not GPU program and using CPU.
__________________________________________________________________________
After all, I want to ask next...
Guys, is there any ways to effective compress prime numbers, without less data?
I think about using Prime gap's + Huffman coding
but if need to search n-th prime, in this case need to sum all previous gaps in the part,
and maybe in all previous parts...
So was been decided to leave prime numbers as packed lists with readable text,
without optimize this to search N-th prime...

A_H_O_H
Send message
Joined: 9 Apr 17
Posts: 25
ID: 819725
Credit: 11,857,204
RAC: 0
PPS Sieve Silver: Earned 100,000 credits (117,985)TRP Sieve (suspended) Bronze: Earned 10,000 credits (19,223)AP 26/27 Turquoise: Earned 5,000,000 credits (8,947,159)GFN Ruby: Earned 2,000,000 credits (2,772,837)
Message 120736 - Posted: 24 Sep 2018 | 23:25:17 UTC - in response to Message 120290.
Last modified: 24 Sep 2018 | 23:25:43 UTC

Consecutive List Of Primes, 1.02 (Windows 64-bit) Copyright 2018, Alexander Belogourov aka x3mEn


Consecutive List Of Primes, 1.02 (Windows 64-bit) Copyright 2018, Alexander Belogourov aka x3mEn


What is this?

I said "Ok, the challenge accepted" and yesterday had wrote the application (to be honest, not from the scratch).

Where is this?

I published the project in Github here.

You can use it at your own risk, but remember, the code is not verified so may contain mistakes.


Nice program, fast generation.
Here is modified .c and compiled .exe
You can see changes.txt, comments in the source code,
and do with this code what do you want.
Maybe this can be optimized to working faster,
but this works fine for me (win32 version).

I think about generating many archives with half prime gaps, and then store and hashing this.
Maybe all primes from 0 to 30 Trillions can be saved in the space ~30 x 3500 x 7MBytes,
because prime gap between primes is even number, not big (sometimes)
and this can be saved as one byte, if this will be divided by 2.
In this case each part with 10M primes have only ~10 MBytes and ~6.4Mbytes if this 7z packed.
In trillion range of natural numbers there is ~35 billions primes ~3500 archives. So 1 TB can store all primes up to 30 trillions.

Also can be writted converter between some formats, as the function, inside the program.

Best regards, and have a nice day.

Message boards : General discussion : List of prime numbers

[Return to PrimeGrid main page]
DNS Powered by DNSEXIT.COM
Copyright © 2005 - 2021 Rytis Slatkevičius (contact) and PrimeGrid community. Server load 2.83, 2.54, 2.53
Generated 24 Sep 2021 | 16:01:52 UTC