home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / sci / math / 10329 < prev    next >
Encoding:
Internet Message Format  |  1992-08-17  |  667 b 

  1. Path: sparky!uunet!usc!elroy.jpl.nasa.gov!news.claremont.edu!ucivax!gateway
  2. From: kibler@turing.ICS.UCI.EDU (Dennis Kibler)
  3. Subject: Primes
  4. Message-ID: <9208171021.aa01492@Paris.ics.uci.edu>
  5. Newsgroups: sci.math
  6. Lines: 39
  7. Date: 17 Aug 92 17:36:15 GMT
  8.  
  9. In mathematica the number of primes less than n or equal to n
  10. is given by PrimePi[n].
  11.  
  12. The following took about 1 second to compute.
  13.  
  14.  
  15.  
  16.  Do[Print[i," ",PrimePi[2^i]],{i,30}]
  17. 1 1
  18. 2 2
  19. 3 4
  20. 4 6
  21. 5 11
  22. 6 18
  23. 7 31
  24. 8 54
  25. 9 97
  26. 10 172
  27. 11 309
  28. 12 564
  29. 13 1028
  30. 14 1900
  31. 15 3512
  32. 16 6542
  33. 17 12251
  34. 18 23000
  35. 19 43390
  36. 20 82025
  37. 21 155611
  38. 22 295947
  39. 23 564163
  40. 24 1077871
  41. 25 2063689
  42. 26 3957809
  43. 27 7603553
  44. 28 14630843
  45. 29 28192750
  46. 30 54400028
  47.  
  48.