Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
| From | Jamie M <jmorken@shaw.ca> |
|---|---|
| Newsgroups | sci.math |
| Subject | Re: gaps in coprimes of primorials |
| Date | 2016-03-30 23:27 -0700 |
| Organization | Aioe.org NNTP Server |
| Message-ID | <ndig05$361$1@gioia.aioe.org> (permalink) |
| References | (4 earlier) <ndao3s$1mui$1@gioia.aioe.org> <ndheuo$2ne$3@dont-email.me> <ndhfb4$2ne$4@dont-email.me> <ndho8k$19pc$2@gioia.aioe.org> <ndic6c$2ne$5@dont-email.me> |
On 3/30/2016 10:22 PM, James Waldby wrote:
> On Wed, 30 Mar 2016 16:42:18 -0700, Jamie M wrote:
> ...
>> What I'm interested to find out about is if I can get a formula to
>> find the sequence of coprimes for a primorial.
>>
>> ie for primorial 30 the coprimes: 1,7,11,13,17,19,23,29
>>
>> EulerPhi(30) is the count of coprimes but I'd like to get the
>> formula to find the actual coprimes. Any idea?
>>
>> I want to find the coprimes of very large primorials efficiently..
>
> I don't know of a formula. It's possible that the following process
> is efficient enough to be worthwhile; or there may be a better
> algorithm; I don't know.
>
> Let v = n# for some large n, so v is a large primorial.
>
> First initialize an empty map, L, with at least v bits in it.
>
> For each prime p less than v, set bit p in L.
>
> Go through L in ascending order, and if bit b is set, do Propagate(b).
>
> Propagate(b): Let m=b. While m<v, do { PPass(b); m = m*b }
>
> PPass(b): Let c=m. While c*b < v, do { Set bit c*b. Advance c to
> next 1-bit in L. }
>
> What the process outlined above should do (after it sets bits for
> primes) is to set bits for multiples of powers of primes for all
> primes larger than n and less than a fraction of v, for all
> not-too-big powers and primes.
>
> Total work in PPass() probably is like O(w*v*sum(1/p)) where the
> sum is over primes p less than sqrt(v), and where w represents
> the average work of a single "Advance c to next 1-bit in L" step.
>
Thanks, right now I just generate a big list of primes and
then check all numbers below the primorial to see if they
are coprime with the primorial, not as fast maybe but I ran
it up to primorial 223092870 now giving this result:
primorial 223092870 coprime equation list gap counts: (36495360 total)
gap count
{[2, 7952175]}
{[4, 7952175]}
{[6, 10169950]}
{[8, 2918020]}
{[10, 3401790]}
{[12, 2255792]}
{[14, 871318]}
{[16, 362376]}
{[18, 396872]}
{[20, 61560]}
{[22, 88614]}
{[24, 48868]}
{[26, 7682]}
{[28, 5664]}
{[30, 2164]}
{[32, 72]}
{[34, 198]}
{[36, 56]}
{[38, 2]}
{[40, 12]}
There should be more ways to optimize finding the coprimes
of primorials, as for one, they are a palindrome, so only
the first half need to be found to fill in the locations
of the second half, but I think there are more ways to
figure out where they are too.
cheers,
Jamie
Back to sci.math | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
gaps in coprimes of primorials Jamie M <jmorken@shaw.ca> - 2016-03-27 14:50 -0700
Re: gaps in coprimes of primorials Jamie M <jmorken@shaw.ca> - 2016-03-27 15:00 -0700
Re: gaps in coprimes of primorials Jamie M <jmorken@shaw.ca> - 2016-03-27 15:20 -0700
Re: gaps in coprimes of primorials Jamie M <jmorken@shaw.ca> - 2016-03-27 15:47 -0700
Re: gaps in coprimes of primorials Jamie M <jmorken@shaw.ca> - 2016-03-28 00:56 -0700
Re: gaps in coprimes of primorials James Waldby <not@valid.invalid> - 2016-03-30 21:03 +0000
Re: gaps in coprimes of primorials James Waldby <not@valid.invalid> - 2016-03-30 21:09 +0000
Re: gaps in coprimes of primorials Jamie M <jmorken@shaw.ca> - 2016-03-30 16:42 -0700
Re: gaps in coprimes of primorials James Waldby <not@valid.invalid> - 2016-03-31 05:22 +0000
Re: gaps in coprimes of primorials James Waldby <not@valid.invalid> - 2016-03-31 06:17 +0000
Re: gaps in coprimes of primorials Jamie M <jmorken@shaw.ca> - 2016-03-30 23:27 -0700
Re: gaps in coprimes of primorials Jamie M <jmorken@shaw.ca> - 2016-03-31 01:11 -0700
Re: gaps in coprimes of primorials James Waldby <not@valid.invalid> - 2016-04-01 02:27 +0000
Re: gaps in coprimes of primorials Jamie M <jmorken@shaw.ca> - 2016-04-01 02:48 -0700
Re: gaps in coprimes of primorials Jamie M <jmorken@shaw.ca> - 2016-04-04 02:20 -0700
Re: gaps in coprimes of primorials Jamie M <jmorken@shaw.ca> - 2016-04-04 08:32 -0700
Re: gaps in coprimes of primorials Jamie M <jmorken@shaw.ca> - 2016-04-04 10:27 -0700
csiph-web