Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > sci.electronics.design > #400017

Re: set of formulas for computing all prime numbers

From Jamie M <jmorken@shaw.ca>
Newsgroups sci.electronics.design, sci.math
Subject Re: set of formulas for computing all prime numbers
Date 2016-02-23 03:05 -0800
Organization Aioe.org NNTP Server
Message-ID <nahees$93f$1@gioia.aioe.org> (permalink)
References (1 earlier) <na4c1d$2ml$1@dont-email.me> <na4k04$1ljq$1@gioia.aioe.org> <eulicbdtcosjshfa8nb22ogcckg8vt6gfk@4ax.com> <nabn8l$7r5$2@gioia.aioe.org> <naemls$9o7$1@dont-email.me>

Cross-posted to 2 groups.

Show all headers | View raw


On 2/22/2016 2:10 AM, David Brown wrote:
> On 21/02/16 07:59, Jamie M wrote:
>> On 2/20/2016 10:32 PM, pedro wrote:
>>> On Thu, 18 Feb 2016 06:20:48 -0800, Jamie M <jmorken@shaw.ca> wrote:
>>>
>>>> On 2/18/2016 4:07 AM, David Brown wrote:
>>>>> On 18/02/16 10:43, Jamie M wrote:
>>>>>> Hi,
>>>>>>
>>>>>>
>>>>>> Here is a set of formulas for computing all prime numbers:
>>>>>
>>>>> How about just the sequence "n" from 1 to infinity?  It will also
>>>>> contain all the prime numbers, and be equally useless, with exactly the
>>>>> same characteristics as your list.
>>>>
>>>> Hi,
>>>>
>>>> Yes it has all the primes but the density of primes is lower,
>>>> ie out of 60 formulas, 43 don't have any primes, yet all 60
>>>> formulas have an equal number of digits, so the density of
>>>> primes is something like 3.5x higher as only 17 formulas out
>>>> of 60, 28% of the overall digits contain all the primes.
>>>
>>> Ignoring my previous post, the fact that these formulae merely produce
>>> a series "containing all primes" is as David states, useless.
>>>
>>> When we used to produce lists of primes on archaic computers (1960's
>>> and 70's) there were simpler approaches than creating a "super-list"
>>> that STILL REQUIRES TESTING.
>>>
>>
>> Hi,
>>
>> That is what the next step is to find the formula to make the
>> list automatically.
>>
>
> It's easy to make such lists automatically (I would call it an
> algorithm, rather than a formula, but it's still easy).
>
> And as has been pointed out, a list of numbers that contains some primes
> and some non-primes is useless unless the density of primes is
> overwhelmingly large (and for any formula like this, the density
> /always/ decreases as you go further out), and/or the non-primes are of
> a form that their non-primality can be easily checked.
>
> So nowhere in this process are you going to end up with something
> directly useful, and you are highly unlikely to come up with some new
> mathematical insight.
>
> However, the whole process can be fun and educational for you as long as
> you are clear on that.  And finding sequences that produce an unusually
> high prime density can be a very interesting challenge.  The
> distribution of primes is, in effect, random - thus there is no end to
> the kind of patterns you can find, but the patterns you find will always
> break down when you stretch them far enough, and are never /rules/.
>
> Finding sets of the form An + x is pretty much done - working with
> ever-greater values of A gets boring very quickly.  Your next step, as I
> see it, is to look for different types of formula - I would go for "An²
> + Bn + C" arrangements.  I would also target getting single formula,
> rather than a list, with an emphasis on prime density.  Don't worry
> about including /every/ prime on the list - that is much less interesting.
>
> But that's just /my/ idea of fun - it's your time you are spending, so
> it is your choice..
>


Hi,

Thanks, I still am trying to figure out the pattern for highest prime
density in a set of formulas for An + x

It turns out it is different that what I was guessing, ie the most
prime dense formulas don't come from primorial numbers, but more
generally from numbers with the most unique divisors I think.

This is based on finding the highest prime dense formula in the
first 7000, and it has a value of 6930, and that has many unique
divisors:

1, 2, 3, 5, 6, 7, 9, 10, 11, 14, 15, 18, 21, 22, 30, 33, 35, 42, 45,
55, 63, 66, 70, 77, 90, 99, 105, 110, 126, 154, 165, 198, 210, 231,
315, 330, 385, 462, 495, 630, 693, 770, 990, 1155, 1386, 2310, 3465,
6930

I don't know if it has the most unique divisors in the first 7000
numbers but wouldn't be surprised.

I need to check higher still to see the ordering of prime density
functions to find the exact pattern as I was already wrong a couple
times. :D

So for 6930, there are 1445 prime producing equations for it, out
of the possible 6930 equations.  The first 49 equations that
produce primes for 6930 have coefficient values:

1,2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,
103,107,109,113,127,131,137,139,149,151,157,163,167,169,173,179,181,191,193,
197,199,211

ie
1 + 6930n
2 + 6930n
3 + 6930n
...
139 + 6930n
...

These values very closely match the prime numbers, will all matches in
that list with the exception of 169, which is the square of 13, and
missing from the divisors of 6930, also the prime 17 is missing from
the divisors, and I checked the square of 17, 289 is also in the list of
values that produce primes for 6930.

So basically the best number for these formulas will have as many unique
divisors as possible I guess that is the simple pattern.

So the performance of these equations is:

for:

17 + 6930n

this produces 72 primes out of the first 144 values for n.

That is the best I found yet, it is 50% primes.

The total number of primes found by all the 1445 prime producing
equations is 78498 in the first 1million digits, which is all the
primes.  And the average number of primes found per prime
producing equation is 78498/1445=54.323

So for all 1445 equations, they average a production of 54.323 primes
out of the first 144 values for n.  That is an average prime
production rate of 37.7%.

So I think basically just having as many unique divisors is the key,
and then the list of equation coefficients will more closely match
the prime numbers, and there will be high prime density.

If I use a bigger number with tons of divisors, I should be able to
get the percentage of primes found up quite a bit still, since
the list of coefficients won't grow much.

cheers,
Jamie


Back to sci.electronics.design | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

set of formulas for computing all prime numbers Jamie M <jmorken@shaw.ca> - 2016-02-18 01:43 -0800
  Re: set of formulas for computing all prime numbers Jamie M <jmorken@shaw.ca> - 2016-02-18 01:53 -0800
    Re: set of formulas for computing all prime numbers pedro <me@privacy.net> - 2016-02-21 14:21 +0800
  Re: set of formulas for computing all prime numbers Virgil <VIRGIL@VIRGIL.com> - 2016-02-18 02:53 -0700
    Re: set of formulas for computing all prime numbers Jamie M <jmorken@shaw.ca> - 2016-02-18 01:55 -0800
  Re: set of formulas for computing all prime numbers Jamie M <jmorken@shaw.ca> - 2016-02-18 02:49 -0800
  Re: set of formulas for computing all prime numbers DecadentLinuxUserNumeroUno <DLU1@DecadentLinuxUser.org> - 2016-02-18 11:26 +0000
  Re: set of formulas for computing all prime numbers David Brown <david.brown@hesbynett.no> - 2016-02-18 13:07 +0100
    Re: set of formulas for computing all prime numbers Jamie M <jmorken@shaw.ca> - 2016-02-18 06:20 -0800
      Re: set of formulas for computing all prime numbers David Brown <david.brown@hesbynett.no> - 2016-02-18 15:48 +0100
        Re: set of formulas for computing all prime numbers Jamie M <jmorken@shaw.ca> - 2016-02-18 06:53 -0800
          Re: set of formulas for computing all prime numbers David Brown <david.brown@hesbynett.no> - 2016-02-18 17:37 +0100
        Re: set of formulas for computing all prime numbers Jamie M <jmorken@shaw.ca> - 2016-02-18 07:09 -0800
          Re: set of formulas for computing all prime numbers David Brown <david.brown@hesbynett.no> - 2016-02-18 17:44 +0100
            Re: set of formulas for computing all prime numbers Jamie M <jmorken@shaw.ca> - 2016-02-18 13:18 -0800
              Re: set of formulas for computing all prime numbers David Brown <david.brown@hesbynett.no> - 2016-02-19 11:40 +0100
                Re: set of formulas for computing all prime numbers DecadentLinuxUserNumeroUno <DLU1@DecadentLinuxUser.org> - 2016-02-19 11:32 +0000
                Re: set of formulas for computing all prime numbers Jamie M <jmorken@shaw.ca> - 2016-02-20 02:15 -0800
            Re: set of formulas for computing all prime numbers Jamie M <jmorken@shaw.ca> - 2016-02-18 13:39 -0800
              Re: set of formulas for computing all prime numbers David Brown <david.brown@hesbynett.no> - 2016-02-19 11:46 +0100
                Re: set of formulas for computing all prime numbers Jamie M <jmorken@shaw.ca> - 2016-02-20 02:35 -0800
                Re: set of formulas for computing all prime numbers Jamie M <jmorken@shaw.ca> - 2016-02-20 02:49 -0800
                Re: set of formulas for computing all prime numbers David Brown <david.brown@hesbynett.no> - 2016-02-22 10:57 +0100
                Re: set of formulas for computing all prime numbers Jamie M <jmorken@shaw.ca> - 2016-02-22 03:18 -0800
                Re: set of formulas for computing all prime numbers David Brown <david.brown@hesbynett.no> - 2016-02-22 10:54 +0100
                Re: set of formulas for computing all prime numbers Jamie M <jmorken@shaw.ca> - 2016-02-22 03:26 -0800
                Re: set of formulas for computing all prime numbers Jamie M <jmorken@shaw.ca> - 2016-02-20 05:12 -0800
              Re: set of formulas for computing all prime numbers Jasen Betts <jasen@xnet.co.nz> - 2016-02-20 08:34 +0000
      Re: set of formulas for computing all prime numbers pedro <me@privacy.net> - 2016-02-21 14:32 +0800
        Re: set of formulas for computing all prime numbers Jamie M <jmorken@shaw.ca> - 2016-02-20 22:59 -0800
          Re: set of formulas for computing all prime numbers David Brown <david.brown@hesbynett.no> - 2016-02-22 11:10 +0100
            Re: set of formulas for computing all prime numbers Jamie M <jmorken@shaw.ca> - 2016-02-23 03:05 -0800
              Re: set of formulas for computing all prime numbers Jamie M <jmorken@shaw.ca> - 2016-02-23 03:19 -0800
              Re: set of formulas for computing all prime numbers David Brown <david.brown@hesbynett.no> - 2016-02-23 12:35 +0100
                Re: set of formulas for computing all prime numbers Jamie M <jmorken@shaw.ca> - 2016-02-23 04:12 -0800
                Re: set of formulas for computing all prime numbers Moufang Loop <moufang.loop@hotmail.invalid> - 2016-02-23 12:43 +0000
                Re: set of formulas for computing all prime numbers Jamie M <jmorken@shaw.ca> - 2016-02-23 05:12 -0800
                Re: set of formulas for computing all prime numbers Moufang Loop <moufang.loop@hotmail.invalid> - 2016-02-23 13:48 +0000
                Re: set of formulas for computing all prime numbers Jamie M <jmorken@shaw.ca> - 2016-02-23 06:07 -0800
                Re: set of formulas for computing all prime numbers Jamie M <jmorken@shaw.ca> - 2016-02-23 05:23 -0800
                Re: set of formulas for computing all prime numbers Moufang Loop <moufang.loop@hotmail.invalid> - 2016-02-23 13:51 +0000
                Re: set of formulas for computing all prime numbers Jamie M <jmorken@shaw.ca> - 2016-02-23 06:12 -0800
                Re: set of formulas for computing all prime numbers Jamie M <jmorken@shaw.ca> - 2016-02-23 06:17 -0800
                Re: set of formulas for computing all prime numbers Jamie M <jmorken@shaw.ca> - 2016-02-23 06:40 -0800
                Re: set of formulas for computing all prime numbers Jamie M <jmorken@shaw.ca> - 2016-02-23 06:42 -0800
                Re: set of formulas for computing all prime numbers Jamie M <jmorken@shaw.ca> - 2016-02-23 08:55 -0800
                Re: set of formulas for computing all prime numbers Jamie M <jmorken@shaw.ca> - 2016-02-23 05:06 -0800
                Re: set of formulas for computing all prime numbers Jamie M <jmorken@shaw.ca> - 2016-02-23 05:54 -0800
                Re: set of formulas for computing all prime numbers Jamie M <jmorken@shaw.ca> - 2016-02-23 05:59 -0800
  Re: set of formulas for computing all prime numbers jack4747@gmail.com - 2016-02-18 04:22 -0800
  Re: set of formulas for computing all prime numbers Moufang Loop <moufang.loop@hotmail.invalid> - 2016-02-18 12:25 +0000
    Re: set of formulas for computing all prime numbers Martin Brown <|||newspam|||@nezumi.demon.co.uk> - 2016-02-18 14:16 +0000
      Re: set of formulas for computing all prime numbers Moufang Loop <moufang.loop@hotmail.invalid> - 2016-02-18 14:53 +0000
        Re: set of formulas for computing all prime numbers Moufang Loop <moufang.loop@hotmail.invalid> - 2016-02-22 14:15 +0000
          Re: set of formulas for computing all prime numbers Moufang Loop <moufang.loop@hotmail.invalid> - 2016-02-22 14:18 +0000
            Re: set of formulas for computing all prime numbers Jamie M <jmorken@shaw.ca> - 2016-02-23 01:47 -0800
              Re: set of formulas for computing all prime numbers Jamie M <jmorken@shaw.ca> - 2016-02-23 01:52 -0800
      Re: set of formulas for computing all prime numbers David Brown <david.brown@hesbynett.no> - 2016-02-18 15:58 +0100
      Re: set of formulas for computing all prime numbers R Kym Horsell <kym@kymhorsell.com> - 2016-02-18 17:34 +0000
    Re: set of formulas for computing all prime numbers Jim Burns <james.g.burns@att.net> - 2016-02-18 10:46 -0500
  Re: set of formulas for computing all prime numbers Sylvia Else <sylvia@not.at.this.address> - 2016-02-18 23:31 +1100
    Re: set of formulas for computing all prime numbers Jamie M <jmorken@shaw.ca> - 2016-02-18 06:09 -0800
    Re: set of formulas for computing all prime numbers Jamie M <jmorken@shaw.ca> - 2016-02-18 06:16 -0800
      Re: set of formulas for computing all prime numbers Sylvia Else <sylvia@not.at.this.address> - 2016-02-19 19:10 +1100
    Re: set of formulas for computing all prime numbers Jamie M <jmorken@shaw.ca> - 2016-02-18 06:45 -0800
  Re: set of formulas for computing all prime numbers bloggs.fredbloggs.fred@gmail.com - 2016-02-20 06:53 -0800
    Re: set of formulas for computing all prime numbers Jamie M <jmorken@shaw.ca> - 2016-02-20 20:44 -0800

csiph-web