Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #11842 > unrolled thread
| Started by | Jared E <eggers.jared@gmail.com> |
|---|---|
| First post | 2012-09-22 06:52 +0000 |
| Last post | 2012-09-23 07:00 +0000 |
| Articles | 2 — 2 participants |
Back to article view | Back to comp.soft-sys.math.mathematica
Percentage of Primes Jared E <eggers.jared@gmail.com> - 2012-09-22 06:52 +0000
Re: Percentage of Primes DC <b.gatessucks@gmail.com> - 2012-09-23 07:00 +0000
| From | Jared E <eggers.jared@gmail.com> |
|---|---|
| Date | 2012-09-22 06:52 +0000 |
| Subject | Percentage of Primes |
| Message-ID | <k3jn7o$297$1@smc.vnet.net> |
I'm brand new to Mathematica, so there's only so much I can teach myself by playing around with it. Could somebody give me some sample code for displaying a graph of the percentage of primes from, say, 1 to 1000. The x-axis would be the integers from 1 to 1000 and the y-axis would indicate the density of primes from 1 to n. I can then figure out how to apply this code to other types of problems. Thanks, Jared
[toc] | [next] | [standalone]
| From | DC <b.gatessucks@gmail.com> |
|---|---|
| Date | 2012-09-23 07:00 +0000 |
| Message-ID | <k3mc2d$72c$1@smc.vnet.net> |
| In reply to | #11842 |
The following will give you a list of pairs with the data you want :
data = Table[{i, PrimePi[i]}, {i, 1, 1000}]
[toc] | [prev] | [standalone]
Back to top | Article view | comp.soft-sys.math.mathematica
csiph-web