On the basis of a high degree of theory, prime numbers are derived through effective processing and steps so as to achieve a remarkable reduction in the processing time taken for the derivation. With respect to an arbitrary prime number rank entered, (1) numerical values are added in sequence to a prime number of the anterior rank to calculate prime number candidates of the next rank; (2) the thus calculated prime number candidate is divided by known prime numbers to verify whether it is a prime number or not; and (3) processing for reducing the verification time is iterated when the thus calculated prime number candidate is larger than a certain value, to thereby derive prime numbers until the entered rank is reached.

Patent
   6578057
Priority
Oct 16 1998
Filed
Sep 09 1999
Issued
Jun 10 2003
Expiry
Sep 09 2019
Assg.orig
Entity
Small
6
3
EXPIRED
1. A method of deriving prime numbers for use in ciphers or message authentication, comprising:
a first step of adding, with respect to a prime number rank entered through an entry means, numerical values to a prime number of the anterior rank in sequence to calculate prime number candidates of the next rank;
a second step of dividing said thus calculated prime number candidate by known prime numbers to verify whether it is a prime number or not; and
a third step of executing processing for reducing the verification time when said thus calculated prime number candidate is larger than a certain value;
whereby prime numbers are derived until said entered rank is reached and said prime number is applied to a use in ciphers or message authentication.
16. A computer readable record medium having thereon
recorded a program for allowing a computer to execute a method of deriving prime numbers, said program comprising
a first step of adding, with respect to a prime number rank entered through an entry means, numerical values to a prime number of the anterior rank in sequence to calculate prime number candidates of the next rank;
a second step of dividing said thus calculated prime number candidate by known prime numbers to verify whether it is a prime number or not;
a third step of executing processing for reducing the verification time when said thus calculated prime number candidate is larger than a certain value; and
a repetition of the deriving of prime numbers until said entered rank is reached.
12. An apparatus for deriving prime numbers comprising:
entry means for entering data, storage means for storing arbitrary prime number products entered through said entry means, a recording medium for recording a program operative to control a processor to derive a prime number, and processing means for processing said entered data and executing said program, wherein said program stored on said recording medium and executable by said processing means comprises:
a first step of adding, with respect to a prime number rank entered through said entry means, numerical values to a prime number of the anterior rank in sequence to calculate prime number candidates of the next rank;
a second step of dividing said thus calculated prime number candidate by known prime numbers to verify whether it is a prime number or not; and
a third step of executing processing for reducing the verification time when said thus calculated prime number candidate is larger than a certain value; and
said processing means is operative to derive prime numbers until said entered rank is reached, and said processing means is operative to store the results in said storage means.
2. A method of deriving prime numbers according to claim 1, wherein
said first step includes calculating said prime number candidates using a recursion formula
AN(I)=A(I-1)+2×J
J={1,2,3, . . . , (A(I-1)-1)/2}
where AN (I); Ith ranked prime number candidate,
A (I); Ith ranked prime number, and
J; positive integer.
3. A method of deriving prime numbers according to claim 2, wherein
said second step includes verifying whether said prime number candidate is a prime number or not, by judging that it is a prime number if the result of division
AN(I)/A(L)
L=2,3, . . . , I-1
where AN (I); Ith ranked prime number candidate, and
A (L); Lth ranked prime number, is not an integer, or by judging that it is not a prime number if said result of division is an integer.
4. A method of deriving prime numbers according to claim 1, wherein
said second step includes verifying whether said prime number candidate is a prime number or not, by judging that it is a prime number if the result of division
AN(I)/A(L)
L=2,3, . . . , I-1
where AN (I);Ith ranked prime number candidate, and
A (L); Lth ranked prime number, is not an integer, or by judging that it is not a prime number if said result of division is an integer.
5. A method of deriving prime numbers according to claim 1, wherein
said third step comprises:
a fourth step of calculating the prime number products of the anterior and posterior ranks allowing a prime number candidate to be contained therebetween;
a fifth step of verifying whether it is a prime number or not by dividing a prime number candidate lying between the prime number products of the anterior and posterior ranks, by a known prime number constituting the prime number product of the anterior rank;
a sixth step of determining a known prime number which is smaller than the square root of a prime number candidate and is most approximate to that square root; and
a seventh step of verifying whether a prime number candidate which has not been verified to be a prime number in said fifth step is a prime number or not, by dividing it by a prime number lying within the segment from the largest known prime number constituting the prime number product of the anterior rank, calculated in the fourth step, to the known prime number which is smaller than the square root of the prime number candidate and is most approximate to that square root, calculated in the sixth step.
6. A method of deriving prime numbers according to claim 5, wherein
said fourth step includes calculating said prime number products of the anterior and posterior ranks allowing a prime number candidate to be contained therebetween, by using an inequality
X(K-1)<AN(I)<X(K)
where AN(I); Ith ranked prime number candidate,
X (K-1); anteriorly ranked prime number product,
X (K); posteriorly ranked prime number product, and
K; positive integer.
7. A method of deriving prime numbers according to claim 6, wherein said fifth step includes first calculating, for a prime number candidate AN (I),
R=AN(I)-D
D=X(K-I)
where AN (I); Ith ranked prime number candidate,
X (K-1); anteriorly ranked prime number product, and
K; positive integer,
said prime number candidate AN (I) resulting in R=1 being reverified by known prime numbers;
said prime number candidate AN (I) resulting in R<A (K-1) being judged not to be a prime number, and
said prime number candidate AN (I) resulting in R>A (K-1) being subjected to a calculation
R/A(T)
T=1,2, . . . , K-1
where A (T); Tth ranked prime number,
and, if the resultant value is an integer, being judged not to be a prime number, but, if not an integer, being reverified by known prime numbers anterior to A (K).
8. A method of deriving prime numbers according to claim 5, wherein
said fifth step includes first calculating, for a prime number candidate AN (I)
R=AN(I)-D
D=X(K-I)
where AN (I); Ith ranked prime number candidate,
X (K-1); anteriorly ranked prime number product, and
K; positive integer, said prime number candidate AN (I) resulting in R=1 being reverified by known prime numbers;
said prime number candidate AN (I) resulting in R<A (K-1) being judged not to be a prime number, and
said prime number candidate AN (I) resulting in R>A (K-1) being subjected to a calculation
R/A(T)
T=1,2, . . . , K-1
where A (T); Tth ranked prime number,
and, if the resultant value is an integer, being judged not to be a prime number, but, if not an integer, being reverified by known prime numbers anterior to A (K).
9. A method of deriving prime numbers according to claim 8, wherein said sixth step includes using an inequality
(AN(I)))½>A(U)
U=2,3, . . . , N-1
where AN(I); Ith ranked prime number candidate,
A (U); Uth ranked prime number, and
U; positive number,
to select a known prime number which is smaller than a square root of said prime number candidate and which is closest to said square.
10. A method of deriving prime numbers according to claim 5, wherein
said sixth step includes using an inequality
(AN(I)½>A(U)
U=2,3, . . . , N-1
where AN (I); Ith ranked prime number candidate,
A (U); Uth ranked prime number, and
U; positive number,
to select a known prime number which is smaller than a square root of said prime number candidate and which is closest to said square.
11. A method of deriving prime numbers according to claim 5, wherein
said seventh step includes subjecting a prime number candidate AN (I) which has not been verified to be a prime number in said fifth step to a calculation
AN(I)/A(L)
L=K,K+1, . . . , U
where AN (I); Ith ranked prime number candidate,
A (L); Lth ranked prime number,
K; rank of largest known prime number constituting anteriorly ranked prime number product, and
U; rank of known prime number which is smaller than square root of the prime number candidate and which is closest to the square root, to judge, if the resultant value is an integer, that it is not a prime number, but to judge, if not an integer, that it is a prime number.
13. The apparatus of claim 12, wherein
said first step includes calculating said prime number candidates using a recursion formula
AN(I)=A(I-1)+2XJ
J={1,2,3, . . . , (A(I-1)-1)/2}
where AN (I); Ith ranked prime number candidate,
A (I); Ith ranked prime number, and
J; positive integer.
14. The apparatus of claim 12, wherein
said second step includes verifying whether said prime number candidate is a prime number or not, by judging that it is a prime number if the result of division
AN(I)/A(L)
L=2,3, . . . , I-1
where AN (I); Ith ranked prime number candidate, and
A (L); Lth ranked prime number, is not an integer, or by judging that it is not a prime number if said result of division is an integer.
15. The apparatus of claim 12, wherein
said third step comprises:
a fourth step of calculating the prime number products of the anterior and posterior ranks allowing a prime number candidate to be contained therebetween;
a fifth step of verifying whether it is a prime number or not by dividing a prime number candidate lying between the prime number products of the anterior and posterior ranks, by a known prime number constituting the prime number product of the anterior rank;
a sixth step of determining a known prime number which is smaller than the square root of a prime number candidate and is most approximate to that square root; and
a seventh step of verifying whether a prime number candidate which has not been verified to be a prime number in said fifth step is a prime number or not, by dividing it by a prime number lying within the segment from the largest known prime number constituting the prime number product of the anterior rank, calculated in the fourth step, to the known prime number which is smaller than the square root of the prime number candidate and is most approximate to that square root, calculated in the sixth step.
17. The computer readable record medium of claim 16 wherein
said first step includes calculating said prime number candidates using a recursion formula
AN(I)=A(I-1)+2XJ
J={1,2,3, . . . , (A(I-1)-1)/2}
where AN (I); Ith ranked prime number candidate,
A (I); Ith ranked prime number, and
J; positive integer.
18. The computer readable record medium of claim 16 wherein
said second step includes verifying whether said prime number candidate is a prime number or not, by judging that it is a prime number if the result of division
AN(I)/A(L)
L=2,3, . . . , I-1
where AN (I); Ith ranked prime number candidate, and
A (L); Lth ranked prime number, is not an integer, or by judging that it is not a prime number if said result of division is an integer.
19. The computer readable record medium of claim 16 wherein
said third step comprises:
a fourth step of calculating the prime number products of the anterior and posterior ranks allowing a prime number candidate to be contained therebetween;
a fifth step of verifying whether it is a prime number or not by dividing a prime number candidate lying between the prime number products of the anterior
and posterior ranks, by a known prime number constituting the prime number product of the anterior rank;
a sixth step of determining a known prime number which is smaller than the square root of a prime number candidate and is most approximate to that square root; and
a seventh step of verifying whether a prime number candidate which has not been verified to be a prime number in said fifth step is a prime number or not, by dividing it by a prime number lying within the segment from the largest known prime number constituting the prime number product of the anterior rank, calculated in the fourth step, to the known prime number which is smaller than the square root of the prime number candidate and is most approximate to that square root, calculated in the sixth step.

1. Field of the Invention

The present invention relates to prime number deriving method and apparatus allowing derivation of prime numbers of arbitrary ranks.

2. Description of the Related Art

It is an extremely difficult work from theoretical and arithmetic viewpoints to exclusively select only prime numbers with definite ranks from a group of numbers having a diversity of properties, which will require processing of electronic computers. Nevertheless, by virtue of the difficulty of selection, the prime numbers are often used in beneficial processes in the industrial fields, including use as ciphers for message authentication, user validation, etc.

For this reason, various prime number deriving methods and verifying methods have hitherto been proposed. Known are for example methods of deriving prime numbers by executing a modular calculation having its basis in the finite region expressed by GF (2n) as Galois field through determination of two prime numbers by RSA method or through use of error correction parameters on modular operations by Montgomery method, and by executing a modular calculation by modular reduction in accordance with Montgomery method (see Japanese Patent Nos. 2,722,411, 2,722,412, 2,722,413, and France Patent No. 2,679,054).

Without exceptions, however, the conventional methods have derived prime numbers through extremely complex processing and processes, requiring an elongated processing time for the derivation, and have failed to achieve simple derivation of prime numbers of arbitrary ranks.

It is therefore the object of the present invention to derive prime numbers through effective processing and steps on the basis of a high degree of theory, to thereby remarkably reduce the processing time required for the derivation and to enable prime numbers of arbitrary ranks to be derived in a simple manner.

FIG. 1 is a flowchart showing processing steps of a method of deriving prime numbers in accordance with the present invention;

FIG. 2 is a diagram showing an example of the hardware configuration of an apparatus for executing the method of deriving prime numbers of the present invention;

FIG. 3 illustrates by way of example a program for executing the method of deriving prime numbers of the present invention;

FIG. 4 is a flowchart showing processing of the program of FIG. 3; and

FIG. 5 is a diagram showing the result of processing of the program of FIG. 3.

A method of deriving prime numbers in accordance with the present invention comprises the following steps:

(1) a step of adding numerical values in sequence to a prime number of the anterior rank to calculate prime number candidates of the next rank;

(2) a step of dividing the thus calculated prime number candidate by known prime numbers to verify whether it is a prime number or not; and

(3) a step of executing processing for reducing the verification time when the thus calculated prime number candidate is larger than a certain value.

The above processing steps of the present method are schematically shown in FIG. 1.

In the first step, the prime number candidate of the next rank is figured out from the prime number of the anterior rank. The calculation of the prime number candidates is carried out using the following recursion formula. As used herein, AN (I) is a prime number candidate of the Ith rank, A (I) is a prime number of the Ith rank, and J is a positive integer.

AN(I)=A(I-1)+2×J (1)

J={1, 2, 3, . . . , (A(I-1)-1)/2} (2)

Since the prime number is a positive integer having no divisors except 1 and itself, prime numbers larger than the second ranked prime number A (2)=3 result inevitably in odd numbers, with the exception of the first ranked prime number A (1)=2. The Ith ranked prime number A (I) is larger than the (I-1)th ranked prime number A (I-1) and smaller than double the(I-1)th ranked prime number A (I-1).

Thus, the Ith ranked prime number A (I) lies within the set of the Ith ranked prime number candidates AN (I), which are obtained by adding (A (I-1)-1)/2 even numbers to the (I-1)th ranked prime number A (I-1).

In the second step, verification is made of whether the above prime number candidate is a prime number or not using the known prime numbers. Let A (L) be a known prime number, if a value obtained by dividing a prime number candidate AN (I) by the known prime number A (L),

AN(I)/A(L)

L=2,3, . . . , I-1

is not an integer, then it can be verified that the prime number candidate is a prime number, but if the value is an integer, then it can be verified that it is not a prime number.

This means that since the prime number candidates AN (I) are already odd numbers, the verification of whether it is a prime number or not can be achieved by division by all the prime numbers of higher ranks than the anterior rank, that is, the second, third, . . . , (I-1)th ranks.

In the third step, the processing for reducing the verification time is carried out if the above prime number candidates are larger than a certain value. The third step includes the following steps:

(4) a step of calculating the prime number products of the anterior and posterior ranks allowing a prime number candidate to be contained therebetween;

(5) a step of verifying whether it is a prime number or not by dividing a prime number candidate lying between the prime number products of the anterior and posterior ranks, by a known prime number constituting the prime number product of the anterior rank;

(6) a step of determining a known prime number which is smaller than the square root of a prime number candidate and is most approximate to that square root; and

(7) a step of verifying whether a prime number candidate which has not been verified to be a prime number in step (5) is a prime number or not, by dividing it by a prime number lying within the segment from the largest known prime number constituting the prime number product of the anterior rank in step (4) to the known prime number which is smaller than the square root of the prime number candidate in step (6) and is most approximate to that square root.

In the fourth step, calculation is made of the prime number products of the anterior and posterior ranks allowing a prime number candidate to be contained therebetween. Herein, the prime number product X (K) is obtained by multiplying in sequence from the first ranked prime number A (1) to the Kth ranked prime number A (K) and is expressed as

X(K)=A(1)A(2) . . . A(K-1)A(K)

In order to figure out the prime number products of the anterior and posterior ranks allowing a prime number candidate to be contained therebetween, the following inequality is used.

X(K-1)<AN(I)<X(K)

where AN (I) is the Ith ranked prime number candidate, D=X (K-1) is the prime number product of the anterior rank, C=X (K) is the prime number product of the posterior rank, and K is a positive integer defined in a manner corresponding to AN (I).

In the fifth step, verification is made of whether a prime number candidate is a prime number or not, by dividing the prime number candidate by a known prime number constituting the anteriorly ranked prime number product.

First, for the prime number candidate AN (I) defined by the above inequality,

R=AN(I)-D (3)

D=X(K-1)

is figured out.

In this case, it is impossible when R=1 to judge whether the prime number candidate AN (I) is a prime number or not. The reason is that when R=1 there results

AN(I)=A(1)A(2) . . . A(K-1)+1

which is insufficient for the judgment of whether it is a prime number or not, requiring rejudgment of the prime property.

In the case of X (5) for example, there results

X(5)=2×3×5×7×11+1=2311

so that it is judged to be a prime number. But, with X (6)

X(6)=2×3×5×7×11×13+1=30031

which includes a factor configuration (59×509), requiring reverification when R=1.

When R≦A (K-1), R has factors of even numbers or not more than (K-1), so that AN (I)=D+R is not a prime number because D and R have the same factor(s)

On the contrary, when R>A (K-1), R is divided by a known prime number equal to or less than A (K-1) to obtain the following remainder.

R/A(T)=m+r (4)

T=1, 2, . . . , K-1

m; positive integer

r; positive integer satisfying 0≦r≦A (T)

Herein, if all of R/A (T) are integers (r=0), it is judged not to be a prime number in the similar meaning to the case of R≦A (K-1).

If R/A (T) is not an integer, that is, if not r=0, then reverification is needed.

In the sixth step, a known prime number is determined which is smaller than the square root of a prime number candidate and which is most approximate to that square root. To determine such a prime number A (U), the following inequality is used, where U is a positive integer.

(AN(I))½>A(U)

U=2, 3, . . . , N-1

This means that if a certain prime number candidate AN (I) is not a prime number, it has two or more prime factors. In other words, AN (I) is given as AN (I)=(a×b), the product of arbitrary two numbers (a, b). Then, the two numbers (a, b) at that time are equal to each other or different from each other, that is, one is larger than the other. It is thus possible to judge whether it is a prime number or not by dividing it by a known prime number less than the square root of AN (I). This is the reason why determination is made of a known prime number A (U) which is smaller than the square root of a prime number candidate and which is most approximate to that square root, to thereby find the value of U.

In the seventh step, verification is made of whether a prime number candidate which has not been verified to be a prime number in the fifth step is a prime number or not, by dividing it by a prime number lying within the segment from the largest known prime number constituting the prime number product of the anterior rank to the prime number which is smaller than the square root of the prime number candidate and is most approximate to that square root.

A prime number candidate AN (I) which has not been verified to be a prime number in the fifth step is subjected to calculation given as

AN(I)/A(L) (5)

L=K,K+1, . . . , U

If the resultant value is an integer then it is judged not to be a prime number, whereas if not an integer then it is judged to be a prime number.

The present invention also provides an apparatus for deriving prime numbers, appropriate for the execution of the above method.

The apparatus comprises, at least, entry means for entering data, storage means for storing arbitrary prime number products entered through the entry means, and processing means for processing the data entered. With respect to a prime number rank entered through the entry means, the processing means derive prime numbers till the entered rank is reached, by way of a step (first step) of sequentially adding numerical values to a prime number of the anterior rank to calculate a prime number candidate of the next rank, a step (second step) of dividing the thus calculated prime number candidate by known prime numbers to verify whether it is a prime number or not, and a step (third step) of executing processing for reducing the verification time when the thus calculated prime number candidate is larger than a certain value. Then the processing means store the thus derived prime numbers in the storage means. The data stored in the storage means can be fed to output means at any time.

In a computer processing unit provided with the processing means, the storage means and the data entry and output means, prime number deriving processing can be executed by use of a computer readable record medium having a program on which is recorded the processing steps of the prime number deriving method set forth hereinabove.

The method of deriving prime numbers of the present invention will now be described more specifically with reference to FIGS. 2 to 5.

The hardware configuration of a system for executing the prime number deriving method of the present invention comprises, as shown in FIG. 2 by way of example, entry means 1, processing means 2 for executing various arithmetic processing, storage means 3 for storing data, storage means 4 for storing variable values, and output means 5.

In the case of the computer processing unit, the processing means 2 correspond to a programmed main control unit (CPU), to which are connected pointing devices such as a keyboard and a mouse acting as the entry means 1, internal memories (RAM, ROM), a hard disk and a flexible disk acting as the storage means 3 and 4, and a display or a printer acting as the output means 5. In the computer processing unit, the processing steps of the prime number deriving method of the present invention are stored on a program, which in turn is read by the storage means 3 and 4 for processing.

In a mode in which the above means are incorporated into a specific apparatus, they may be connected to one another by way of a data bus. The hardware configuration is not intended to be limited to the example shown.

The 1st ranked prime number A (1) to the Mth ranked prime number A (M) are stored in advance in the storage means 3. Note that M is an appropriate integer larger than 2. The reason is that the above recursion formula (1) cannot be applied to the prime number of the 2nd rank or higher, that is, to I≦2.

In a program shown in FIG. 3, as described in line No. 140, the 1st ranked prime number A (1)=2 to the 46th prime number A (46)=199 are entered in advance as known prime number data.

The initial values of the prime number products D and C of the anterior and posterior ranks, and the initial value of K are also stored in the storage means 3. Herein, D≧X (1)=2, C≧X (2)=2×3=6.

In the program shown in FIG. 3, as described in line No. 110, D=X (3)=2×3×5=30, C=X (4)=2×3×5×7=210, and K=3 are entered as the initial value data.

In order to execute the prime number deriving method of the present invention, the system is first activated and, when there appears "A (N)=" on the display acting as the output means, the rank N of a prime number to be derived is entered through the entry means 1 in the form of the keyboard. The thus entered rank N is stored via the processing means 2 into an N storage file of the storage means 4.

In the program shown in FIG. 3, description is hereinafter made of the case by way of example where the 60th ranked prime number is derived, that is, where 60 is entered as N.

When entering the deriving rank N, as described in line Nos. 120 to 170, the processing means 2 read known prime number data in sequence from the storage means 3, which are written to A (1) to A (46) and stored in the A (I) storage file of the storage means 4, allowing the ranks and corresponding prime numbers to appear as "1 2, 2 3, . . . 46 199" in sequence on the display.

Then, as described in line Nos. 290 to 310, the first step for calculating prime number candidates is carried out.

The processing means 2 read the 46th ranked prime number A (46)=199 from the A (I) storage file of the storage means 4 and first execute a calculation using the expression (2)

(A(I-1)-1)/2

to obtain 99. Thus,

J={1,2,3, . . . , 99}

hence, there exist 99 prime number candidates AN (47).

Then, the recursion formula (1) is used to figure out the first prime number candidate A1 (47) as follows.

A1(47)=A(46)+2×1=199+2=201

Then, as described in line No. 320, the processing means 2 read from the storage means 3 the initial value of the prime number product C of the posterior rank, that is, C=210, which in turn is compared in magnitude with A1 (47)=201.

As to the first prime number candidate A1 (47) there results A1 (47)<C, so that the fifth step is carried out, whereas as to the prime number candidate AN (47) posterior to the sixth prime number candidate A6 (47)=211 there is established AN (47)>C, allowing the execution of the fourth step for calculating the prime number products D and C of the anterior and posterior ranks which contain a prime number candidate therebetween.

The fourth step is carried out, by the processing means 2, as described in line Nos. 210 to 260.

The processing means 2 read from the storage means 3 the initial value of K, that is, K=3, and adds 1 thereto, which is newly stored in a K storage file of the storage means 4.

Then, as described in line Nos. 230 to 250, the prime number products X (K) are calculated in sequence as follows.

X(2)=X(1)×A(2)=A(1)×A(2)=2×3=6

X(3)=X(2)×A(3)=6×5=30

X(4)=X(3)×A(4)=30×7=210

The above processing is repeated and the prime number product X (5) is figured out as follows.

X(5)=X(4)×A(5)=210×11=2310

Then, the prime number product X (4) of the anterior rank is newly set as D, with the prime number product X (5) of the posterior rank being set as C, which are stored respectively into the D storage file and the C storage file of the storage means 4.

The fifth step is carried out, by the processing means 2, as described in line Nos. 330 to 370.

The processing means 2 first executes a calculation using the expression (3) as follows.

R=A1(47)-D=201-30=171

The processing means 2 then judge the magnitude of R and A (K-1). In this case, A (K-1)=A (3-1)=A (2)=3, hence R>A (K-1).

Then, calculation is executed in sequence using the expression (4) as follows.

R/A(1)=171/2=m+r=170+1

R/A(2)=171/3=m=57(r=0)

If T=2, then r=0 and R/A (2) results in an integer. Hence, it is judged that A1 (47) is not a prime number.

Then, the procedure goes back to the first step in which the recursion formula (1) is used to figure out the second prime number candidate A2 (47) as follows.

A2(47)=A(46)+2×2=199+4=203

Then, in the same manner as the above, the processing means 2 judge the magnitude of the posteriorly ranked prime number product C=210 and of A2 (47)=203. The result is A2 (47)<C, allowing the execution of the fifth step.

In the fifth step, the processing means 2 execute a calculation using the expression (3) as

R=A2(47)-D=203-30=173

to judge the magnitude of R and A (K-1). In this case as well, A (K-1)=3, and hence R>A (K-1).

Calculations are then made using the recursion formula (4) as

R/A(1)=173/2=m+r=172+1

R/A(2)=173/3=m+r=171+2

whereupon r=0 is not obtained and the result of division does not become an integer, so that the sixth step is carried out.

The sixth step is performed by the processing means 2 as described in line Nos. 500 to 530.

The processing means 2 first figure out the square root of A2 (47) as

(A2(47))½=(203)½=14.2

to judge the magnitude relative to A (U) in sequence.

(A2(47))½=14.2>A(2)=3

(A2(47))½=14.2>A(3)=5

(A2(47))½=14.2>A(4)=7

(A2(47))½=14.2>A(5)=11

(A2(47))½=14.2>A(6)=13

(A2(47))½=14.2<A(7)=17

Then, U=7, at which (A2 (47))½<A (U) has first resulted, is stored in a U storage file of the storage means 4, allowing the execution of the seventh step.

The seventh step is carried out, by the processing means 2, as described in line Nos. 540 to 590.

The processing means 2 first read U=7 from the U storage file of the storage means 4 and add 1 thereto to obtain Z. Thus, Z=7+1=8.

Then, calculations are made in sequence using the expression (5) until L reaches Z=8, starting from K=3.

A2(47)/A(3)=203/5=40.6

A2(47)/A(4)=203/7=29

When L=4, an integer is obtained, whereupon it is judged that A2 (47) is not a prime number.

Hereinbelow, as the third prime number candidates A3 (47), the fourth prime number candidates A4 (47), etc., the steps are executed in an appropriate manner to verify whether each one is a prime number or not.

Thus, when the prime number A (47) of the 47th rank is defined, prime number candidates AN (48) of the 48th rank are verified through appropriate execution of the steps so that the 48th ranked prime number A (48) is defined.

The processing means 2 iteratively execute the steps in an appropriate manner, to derive the 47th ranked prime number A (47) to the 60th ranked prime number A (60), which in turn are stored in the storage means 3 and 4 as needed. Simultaneously, the processing means 2 update the above variables and provide in sequence the ranks and corresponding prime numbers, in the form of, e.g., "47 211, . . . , 60 281", as its output to the display, i.e., the output means 5.

A flowchart illustrating the processing of the above program is shown in FIG. 4, and the result of processing appearing on the display through the execution of the program is shown in FIG. 5.

Hori, Hironobu

Patent Priority Assignee Title
10210169, Mar 31 2011 EMC IP HOLDING COMPANY LLC System and method for verifying consistent points in file systems
7016494, Mar 26 2001 MICRO FOCUS LLC Multiple cryptographic key precompute and store
7120248, Mar 26 2001 VALTRUS INNOVATIONS LIMITED Multiple prime number generation using a parallel prime number search algorithm
7478163, Feb 04 2003 Method and apparatus for presenting multimedia content and for facilitating third party representation of an object
9118481, Dec 01 2011 COLLOID, LLC Method and system for efficiently generating a high quality pseudo-random sequence of numbers with extraordinarily long periodicity
9520995, Oct 28 2011 GIESECKE+DEVRIENT MOBILE SECURITY GMBH Efficient prime-number check
Patent Priority Assignee Title
4351982, Dec 15 1980 RACAL GUARDATA, INC RSA Public-key data encryption system having large random prime number generating microprocessor or the like
6307938, Jul 10 1998 IBM Corporation Method, system and apparatus for generating self-validating prime numbers
6330332, Jul 30 1997 Fujitsu Limited Prime number generation apparatus B-smoothness judgement apparatus and computer memory product
Executed onAssignorAssigneeConveyanceFrameReelDoc
Date Maintenance Fee Events
Dec 08 2006M2551: Payment of Maintenance Fee, 4th Yr, Small Entity.
Jan 17 2011REM: Maintenance Fee Reminder Mailed.
Jun 10 2011EXP: Patent Expired for Failure to Pay Maintenance Fees.


Date Maintenance Schedule
Jun 10 20064 years fee payment window open
Dec 10 20066 months grace period start (w surcharge)
Jun 10 2007patent expiry (for year 4)
Jun 10 20092 years to revive unintentionally abandoned end. (for year 4)
Jun 10 20108 years fee payment window open
Dec 10 20106 months grace period start (w surcharge)
Jun 10 2011patent expiry (for year 8)
Jun 10 20132 years to revive unintentionally abandoned end. (for year 8)
Jun 10 201412 years fee payment window open
Dec 10 20146 months grace period start (w surcharge)
Jun 10 2015patent expiry (for year 12)
Jun 10 20172 years to revive unintentionally abandoned end. (for year 12)