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


Groups > sci.electronics.design > #403531

Re: encoder and decoder for compact representation of the prime numbers

From Jamie Morken <jmorken@shaw.ca>
Newsgroups sci.electronics.design, sci.math
Subject Re: encoder and decoder for compact representation of the prime numbers
Date 2016-03-19 12:37 -0700
Organization Aioe.org NNTP Server
Message-ID <nck9r0$b0b$1@gioia.aioe.org> (permalink)
References (1 earlier) <dl1rdrF4v6uU1@mid.individual.net> <bf7f91ce-e809-40f5-9c52-5205f8f34ca9@googlegroups.com> <nchrj2$n4j$1@gioia.aioe.org> <dl3nrsFk717U1@mid.individual.net> <ncjsu7$1jbp$1@gioia.aioe.org>

Cross-posted to 2 groups.

Show all headers | View raw


On 3/19/2016 8:57 AM, Jamie Morken wrote:
> On 3/18/2016 6:21 PM, Sylvia Else wrote:
>> On 19/03/2016 8:21 AM, Jamie Morken wrote:
>>> On 3/18/2016 5:46 AM, acd wrote:
>>>> Am Freitag, 18. März 2016 09:09:37 UTC+1 schrieb Sylvia Else:
>>>>> On 18/03/2016 6:58 PM, Jamie Morken wrote:
>>>>> 7,19,23,29,31,37,41,43,47,53,59
>>>>>>
>>>>>> looks good so far just like the primes so the decoder works fine at
>>>>>> least on paper.  Using a very large primorial is a good idea too
>>>>>> as the prime density per bit (or bits required per prime) is more
>>>>>> compact.
>>>>>
>>>>> As the density of primes drops asymptotically towards zero for large
>>>>> primes, it doesn't matter how large a number of you choose, the
>>>>> packing
>>>>> efficiency will also drop towards zero.
>>>>>
>>>>
>>>> I do not think so, you could just give n for the nth prime.
>>>> This is the most compact representation. Decoding will be difficult,
>>>> of course.
>>>> If you cannot access a full table you could store only the primes for
>>>> powers of two, or similar, then you have a starting point for the
>>>> search.
>>>>
>>>> Andreas
>>>>
>>>
>>> Hi,
>>>
>>> Ya the packing density is optimal for an infinite primorial as there are
>>> log(n) coprimes for the infinite primorial (just the sequence of primes)
>>
>> You can't just treat infinity as if it were a number. It's not. There is
>> no such thing as an infinite primorial. All primorials are finite.
>>
>> Sylvia.
>>
>
>
> A primorial number is a product of primes, if there are infinite primes,
> then there is a primorial that is the product of them all.
>
> cheers,
> Jamie
>
>
>


I found lots of the same stuff of what I was talking about for encoding
and decoding the primes:

http://stackoverflow.com/questions/2614147/efficiently-storing-a-list-of-prime-numbers

https://programmingpraxis.com/2010/03/26/the-next-prime/

http://www.qsl.net/w2gl/blackkey.html

http://stackoverflow.com/questions/1428786/best-way-to-find-a-prime-number

http://stackoverflow.com/questions/1024640/calculating-phik-for-1kn/1134851#1134851

https://en.wikipedia.org/wiki/Wheel_factorization


cheers,
Jamie







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


Thread

encoder and decoder for compact representation of the prime numbers Jamie Morken <jmorken@shaw.ca> - 2016-03-18 00:58 -0700
  Re: encoder and decoder for compact representation of the prime numbers Sylvia Else <sylvia@not.at.this.address> - 2016-03-18 19:09 +1100
    Re: encoder and decoder for compact representation of the prime numbers acd <acd4usenet@lycos.de> - 2016-03-18 05:46 -0700
      Re: encoder and decoder for compact representation of the prime numbers Jamie Morken <jmorken@shaw.ca> - 2016-03-18 14:21 -0700
        Re: encoder and decoder for compact representation of the prime numbers Sylvia Else <sylvia@not.at.this.address> - 2016-03-19 12:21 +1100
          Re: encoder and decoder for compact representation of the prime numbers Jamie Morken <jmorken@shaw.ca> - 2016-03-19 08:57 -0700
            Re: encoder and decoder for compact representation of the prime numbers Jamie Morken <jmorken@shaw.ca> - 2016-03-19 12:37 -0700

csiph-web