Message Boards Message Boards

Obtain more primes than Prime[n] offers?

Posted 7 years ago

I am working with recursive prime sequences of the form

Prime[Prime[Prime[Prime[n]]]]

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.

POSTED BY: Bryan Lettner
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 BY: Daniel Lichtblau
Posted 7 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.

POSTED BY: Bryan Lettner
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract