MathGroup Archive 2007

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: PrimePi and limit of argument

  • To: mathgroup at
  • Subject: [mg78087] Re: [mg77911] PrimePi and limit of argument
  • From: DrMajorBob <drmajorbob at>
  • Date: Fri, 22 Jun 2007 06:49:05 -0400 (EDT)
  • References: <7566193.1182423757619.JavaMail.root@m35>
  • Reply-to: drmajorbob at

If you decide to compute PrimePi[100] by hand, you might take a piece of  
paper and write down the primes up to 97, then count them. If you try the  
same method for PrimePi[10^15], you'll need a bigger piece of paper.

But you'll need a lot MORE than a bigger piece of paper -- you'll need a  
smarter algorithm, or you'll never live long enough. And that's what  
Mathematica is telling you; the PrimePi method has an upper ceiling,  
independent of how big your machine might be.

You may as well demand a general solution in radicals for 7th-degree  

7 isn't a large number, but even so, it can't be done... even if your  
machine is bigger than the universe.


On Tue, 19 Jun 2007 05:47:55 -0500, Robert Pigeon  
<robert.pigeon at> wrote:

> Hello all,
>   I was playing around with the function PrimePi[] and trying different
> arguments. When I tried PrimePi[10^15] I got the error message saying  
> that
> the argument is too large for this implementation. I know that it is a  
> large
> number.! When I use 10^14 as the argument I get an answer, it takes a  
> while
> but I get an answer.
>  I tried this on a PC running Vista Home Premium 64-bit with Mathematica  
> 6.
> Then I tried the same thing under Windows XP 32-bit. There was no
> difference, I got an answer for 10^14 and same error message with 10^15.
> My question is: I thought that with a 64-bit computer I could use larger
> numbers.! Maybe I am misunderstanding something here, so please help me
> understand J
> Thanks,
> Robert
> Robert Pigeon

DrMajorBob at

  • Prev by Date: Re: Re: Integrate modified in version 6?
  • Next by Date: Re: Mind+Mathematica
  • Previous by thread: Re: PrimePi and limit of argument
  • Next by thread: Re: Re: PrimePi and limit of argument