View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
cht13er cht13er is offline
external usenet poster
 
Posts: 141
Default Is there a formula for identifying prime numbers in Excel?

On Apr 17, 11:50*am, Joel wrote:
How large are your numbers? *sometimes it is more effficient to make a table
of prime numbers and perform a lookup to determine which numbers are prime
and which numbers are not prime.



"t_elam" wrote:
I have some mathematic formulas that I am working with, and I need to see
what formulas generate prime numbers. *Please let me tell me if you know a
way of getting Excel to identify which numbers are prime.


Thanks,- Hide quoted text -


- Show quoted text -


You can get the first 5,000 prime numbers pretty quickly (I did it the
other day) by looking only at odd numbers and checking each new number
(say 5) against every number above it (3) .. so if 5Mod3 = 0 then it's
not a prime number ...

HTH

Chris