Message Boards Message Boards


Obtain more primes than Prime[n] offers?

Posted 2 years ago
2 Replies
1 Total Likes

I am working with recursive prime sequences of the form


Unfortunately, the values get large fast, and the Prime[n] function tops out at around Prime[8trillion]. enter image description here

Is there a way to get more primes, such as a Mathematica package or? I haven't been able to find any complete lists of primes larger than this. Ideally, I need a complete list of primes up to Prime[10^100] or so.

I suppose I could let a Sieve of Eratosthenes run, and dump primes to a text file, but I'm guessing that would take... months or years to get to Prime[10^100]? Any advice is appreciated.

2 Replies

Your guess is off by a bit...

Use the Prime Number Theorem to estimate how many primes are in the set of integers up to 10^100. Then do any of the following.

(1) Estimate how long to store that sequence, assuming you can store one per chip cycle, using say 10^5 chips each operating at 10^12 cycles per second.

(2) Compare the number to estimated atoms in the universe.

(3) Rethink the computation you are doing to see if there is a variant that is computationally feasible. The one stated is not.

Posted 2 years ago

Thanks Daniel. Kind of a silly question in retrospect. I will use an estimating function for the time being, such as enter image description here (DasGupta 2005)

If anyone has a more accurate one, I'm all ears.

Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
or Discard

Group Abstract Group Abstract