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


Groups > sci.math > #330979

Re: gaps in coprimes of primorials

From James Waldby <not@valid.invalid>
Newsgroups sci.math
Subject Re: gaps in coprimes of primorials
Date 2016-03-31 06:17 +0000
Organization A noiseless patient Spider
Message-ID <ndife2$2ne$6@dont-email.me> (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>

Show all headers | View raw


On Thu, 31 Mar 2016 05:22:20 +0000, 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 snipped the algorithm that I presented earlier, which first sets 
a 1-bit for each prime between n and v, then sets bits for various
multiples of set bits.  Instead, the following rather-simpler and 
probably-faster method turns off bits for multiples of 2, 3,... n:

Let v = n# for some large n, so v is a large primorial.

Initialize a map L with v bits in it, each set to 1.

For each prime p in {2, 3, ... n}, do PPass(p).

PPass(p): While k*p < v, do { Clear bit k*p.  Add 1 to k. }

Each bit that's still set after the above process corresponds
to a number co-prime to v.

-- 
jiw

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


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