It seems correct, but we can say it in an equivalent way:

the set of prime numbers = 2, 5 PLUS all odd numbers > 5, not ending by

5 and not composite.

Following your way we could perform primality test on a number N

searching odd numbers ending by 1, 3, 7, 9 and less than sqrt(N).

Moreover, considering the least significant digit:

...1 => 1 x 1 or 3 x 7 or 9 x 9

...3 => 1 x 3 or 7 x 9

...7 => 1 x 7 or 3 x 9

...9 => 1 x 9 or 7 x 7 or 3 x 3

we can limit our search to a set of the order of sqrt(N) x 2/10 or

sqrt(N) x 3/10 elements.

That is: numbers ending by 1, 3, 9 (or 1, 7, 9) if N ends by 1 and so

on.

I was wondering this: for a fixed M, are there more primes < M ending

with 3 and 7 than primes < M ending with 1 and 9?

Gianni

>-----Original Message-----

>From: Jim Doyle [mailto:ozyjim2004@...]

>Sent: Friday, December 03, 2004 1:53 AM

>To: primenumbers@yahoogroups.com

>Subject: [PrimeNumbers] another way to calculate primes

>

>

>Hi

>

>I'm not sure if this is a new idea but I have not come across

>it . Its based on the fact that apart from 2 and 5 all primes

>have a last digit of 1,3,7 or 9.

>

>...

>...

>

>Jim