Re: [PrimeNumbers] Explicit calculation of prime positive integers
- Hi !
Kermit Rose wrote:
> Kermit says:hmmmm it looks like... some sort of folded sieve,
> One could construct the following vector sequence that would make clear
> what it is that makes a prime a prime.
> To make the next entry,
> Just add 1 to each number in the vector.
> Each time you cross a prime, you add another entry for that prime.
> Each time you reach 2 in the 2's place, start over, so that the next
> entry in the 2's place is a 1.
> Each time you reach 3 in the 3's place, start over so that the next
> entry in the 3's place is a 1.
it reminds me of stack-based algorithms,
and your vector is a bit like a stack... quite clever :-)
a stack of counter in fact...
but this method needs to scan all numbers.
it does not jump from one prime number to the other :-/
> 2 =  First prime.<snip>
> 3 =  Prime because 2 is not in the 2's place.
> 4 = [2,1] Not prime because in the 2's place is a 2.
> 5 = [1,2] Prime because in the 2's place is not a 2, and in the 3's
> place is not a 3.
> 6 = [2,3,1] Not prime because in the 2's place is a 2. Also not prime
> because in the 3's place is a 3.
> 7 = [1,1,2] Prime because in the 2's place is not a 2, and in the 3's
> place is not a 3, and in the 5's place is not a 5.
> etcI'll think carefully about the method you show.
does it have a name, where is it used, how can it be found or referenced ?
> Kermit says:I have just put some example code online at http://ygdes.com/sources/premiers.html
> Yann, in order to answer your question, we need to know details of your
I'm not (yet ?) used to the tools that many contributors here use
(pari ?), it could change when I get a better idea about it.
The algorithm is explained in an article that will soon be published.
The original is there : http://ygdes.com/sources/misc-prems.html
(sorry, french only). It's a newcomer-level article but some
interesting stuff is at the end.
> Kermit says:maybe my "why" is the "how" of the "how" ?
> Hmmmm...... Why versus how.
> I think that maybe I have never understood the meaning of "why?".
> For me, answering how things happen does answer all my questions.
> I myself see no difference in meaning for "why?" and "how?".
anyway i'm too tired to dissert about it now.
thank you very much for your insight,
> Kermit Roseyg