View Single Post
  #5  
Old 11-23-2007, 01:56 AM
gumpzilla gumpzilla is offline
Senior Member
 
Join Date: Feb 2005
Posts: 7,911
Default Re: Simple storage problem (math)

[ QUOTE ]
there is an equation n/ln(n) which will estimate the number of primes less than n, so the answer is 2.29e9/ln(2.29e9) for the approximate number of non primes. i dont know about the storage space stuff but the approx number of primes is 106,255,539

[/ QUOTE ]

The majority of those are going to be 8,9,10 digit numbers, which will take 24-30 bits to store. Naively storing all of them is going to exceed your bit budget considerably.
Reply With Quote