Sieve of Prime Numbers Using Algorithms

This study suggests grouping of numbers that do not divide the number 3 and/or 5 in eight columns. Allocation results obtained from multiplication of numbers is based on column belonging to him. If in the Sieve of Eratosthenes the majority of multiplication of prime numbers result in a results devoid of practical benefit (numbers divisible by 2, 3 and/or 5), in the sieve of prime numbers using algorithms, each multiplication of prime number gives a result in a number not divisible to 2, 3 and/or 5.


Sieve of prime numbers using algorithms
This paper deals with the study of odd numbers that cannot be divided with 3 and/or 5 by grouping them in eight columns, as follows: The multiplication versions are in number of 36, their results being allocated according to columns, explained in Table 1.

Position Calculus
From the result of multiplying two numbers subtract the number assigned at position zero of the column namely one of the numbers i(p0): 7-11-13-17-19-23-29-31, the result is divided by 30. Integer obtained indicates the position of that number considering its column origin [1,2].

Formulas for determining the position
Position occupied by the result of the multiplication between numbers i(p0), i(p1), i(p2),..., i(pn), with all the numbers in Table 2. Position occupied p1 as a result of multiplication of numbers i (p1) and all the numbers in Table 3; Positions of p1 are used to calculate p2, p3, p4,...., pn multiplying i(p0), positions occupied p2 as a result of multiplication of numbers i(p2) and all the numbers in Table 4;

Calculation algorithm
• Fill in Table 1 with all the numbers to be tested if they are prime number; • Write all numbers under test, in order of their increasing in column 9,as shown in Table 5; • Fill p0 formulas in Table 5;     • Mark all numbers divisible in Table 1 by the formulas of p0; • Eliminates all the numbers in column 9 Table 2 that were marked in Table 1 according to the formulas of p0;

Sieve of Prime Numbers Using Algorithms
• Fill formulas of p1 Table 2; number 49 was removed according to Table 1 no longer consider; • Repeat the operations made in step 4 and 5 according to the formulas p1; • Fill formulas of p2 Table 2 and repeat the operations in step 4 and 5. Numbers not eliminated in column 9 Table 2 are prime numbers.
In column 9 we register numbers under test up to P (max). Maxim position calculation is the integer number of the maximum number being tested radical divided by 30 [2][3][4].
Using the tables respecting the above algorithm complexity is much smaller, any multiple of prime number (which represents the number of position) has corresponding number is compound odd number and not divisible by 3 and/or 5. Col.8=27+29n=27 (841) Col.8=31+31n=31 (961) Numbers not eliminated are prime numbers

Application: The Factorial Multiplying or the Method of Determining if a Number is Prime up to a Given Number
The method of grouping odd numbers according to Table 1, allows checking whether a number is prime according to the last two or five digits of position the number.

For termination two digits
The calculation algorithm is: Step 1: Determine the position number and column it belongs; Step 2: Last two digits of the calculated number indicates the termination position of tested number; Step 3: Determine factors for termination and column number tested. I have illustrated the calculation of factors termination 10, column 1. Once calculated these factors can be used to determine of any prime numbers that belongs to the column 1, termination 10.
Step 4: It performs testing divisibility of a number with multiples of 3 000 plus pairs of numbers factorial group to which it belongs termination corresponding column number tested.
We assign factorial group for multiplying operation positions from 0-99, as in Table 1, numbers between 7-3.001 grouped in columns. The position occupied by the result of the multiplication between any two numbers in the factorial group is a maximum six digit number. The last two digits of the number shows the termination, the rest of maximum four digits is the factor and which the position will be calculated for those termination belonging to specific column [5,6]. I1 and I2 are two numbers higher than the numbers belonging to factorial group.

For termination five digits
The calculation algorithm is: group factorial. Factorial multiplication process has as principle of calculation pairs of numbers that belong to the factorial group unique to each termination and column.