Talk:Prime conspiracy: Difference between revisions

From Rosetta Code
Content added Content deleted
m (→‎numbers in the example for the task: elided part of the output that wasn't supposed to be displayed.)
(Undo revision 223781 by Gerard Schildberger (talk))
Line 1: Line 1:
===numbers in the example for the task===
===numbers in the example for the task===
Nevermind, I found the problem   (had to do with the calculation of the upper bound for the sieve).   -- [[User:Gerard Schildberger|Gerard Schildberger]] ([[User talk:Gerard Schildberger|talk]]) 23:42, 21 March 2016 (UTC)

<strike>


For 10,000 primes &nbsp; (as shown by the example in the Rosetta Code task), my numbers (using the REXX program) &nbsp; don't match those shown:
For 10,000 primes &nbsp; (as shown by the example in the Rosetta Code task), my numbers (using the REXX program) &nbsp; don't match those shown:
<pre>
<pre>
For 10000 primes used in this study:
For 10000 primes used in this study:

and took 0.11 seconds.
H= 80000
prime 10001 is: 84327


digit 1 ──► 1 has a count of: 281, frequency of: 2.81%.
digit 1 ──► 1 has a count of: 281, frequency of: 2.81%.
Line 26: Line 33:
</pre>
</pre>
Does anyone else match either set of numbers for 10,000 primes? &nbsp; -- [[User:Gerard Schildberger|Gerard Schildberger]] ([[User talk:Gerard Schildberger|talk]]) 22:32, 21 March 2016 (UTC)
Does anyone else match either set of numbers for 10,000 primes? &nbsp; -- [[User:Gerard Schildberger|Gerard Schildberger]] ([[User talk:Gerard Schildberger|talk]]) 22:32, 21 March 2016 (UTC)

</strike>


I get a different result. Also, prime 10001 is 104759. Prime 8220 is 84327. Prime 0 is 2. So that's probably your issue. --[[User:Rdm|Rdm]] ([[User talk:Rdm|talk]]) 22:42, 21 March 2016 (UTC)
I get a different result. Also, prime 10001 is 104759. Prime 8220 is 84327. Prime 0 is 2. So that's probably your issue. --[[User:Rdm|Rdm]] ([[User talk:Rdm|talk]]) 22:42, 21 March 2016 (UTC)

Revision as of 23:43, 21 March 2016

numbers in the example for the task

Nevermind, I found the problem   (had to do with the calculation of the upper bound for the sieve).   -- Gerard Schildberger (talk) 23:42, 21 March 2016 (UTC)

For 10,000 primes   (as shown by the example in the Rosetta Code task), my numbers (using the REXX program)   don't match those shown:

For  10000  primes used in this study:

and took 0.11 seconds.
H= 80000
prime  10001  is:  84327

digit  1 ──► 1  has a count of:   281,  frequency of:   2.81%.
digit  1 ──► 3  has a count of:  1094,  frequency of:  10.94%.
digit  1 ──► 7  has a count of:   697,  frequency of:   6.97%.
digit  1 ──► 9  has a count of:   308,  frequency of:   3.08%.

digit  3 ──► 1  has a count of:   417,  frequency of:   4.17%.
digit  3 ──► 3  has a count of:   236,  frequency of:   2.36%.
digit  3 ──► 7  has a count of:   588,  frequency of:   5.88%.
digit  3 ──► 9  has a count of:   719,  frequency of:   7.19%.

digit  7 ──► 1  has a count of:   512,  frequency of:   5.12%.
digit  7 ──► 3  has a count of:   578,  frequency of:   5.78%.
digit  7 ──► 7  has a count of:   254,  frequency of:   2.54%.
digit  7 ──► 9  has a count of:  1059,  frequency of:  10.59%.

digit  9 ──► 1  has a count of:  1170,  frequency of:  11.70%.
digit  9 ──► 3  has a count of:   485,  frequency of:   4.85%.
digit  9 ──► 7  has a count of:   431,  frequency of:   4.31%.
digit  9 ──► 9  has a count of:   302,  frequency of:   3.02%.

Does anyone else match either set of numbers for 10,000 primes?   -- Gerard Schildberger (talk) 22:32, 21 March 2016 (UTC)

I get a different result. Also, prime 10001 is 104759. Prime 8220 is 84327. Prime 0 is 2. So that's probably your issue. --Rdm (talk) 22:42, 21 March 2016 (UTC)

Pascal results also match the numbers given in the example. --G.Brougnard (talk) 22:48, 21 March 2016 (UTC)