Tuesday, July 29, 2008

Example For Pseudo Prime Generation

Choose x = 7, N = 103, then PP1 = 11 and PP2 = 13

then 7K1 (mod 103) = 11 which implies K1 = 31 and 7K2 (mod 103) = 13 which implies K2 = 46

then dK1 = K2 - K1 as K2 > K1 then dK1 = 46 - 31 = 15

choose n = 11 then 11th pseudo prime PP11 is generated as follows

j = (n - 1)/3 = (11 - 1)/3 = 10/3 = 3

i = n(mod 3) = 11(mod 3) = 2

r = j(mod 2) = 3( mod 2 ) = 1

then f(n) = 6j as i = 2, r = 1 and n > 3 therefore f(11) = 6*3 = 18

then K11 = ( K2 - ( dK1 * ( N + 1 - f(11) ) ) ) (mod 103) = (46 - ( 15 * (103 + 1 - 18 ) ) ) (mod 103)
= (46 - (15 * 86 ) ) (mod 103) = -1244 (mod 103) = 95

thus K11 = 95 then PP11 = (7 * 95 ) (mod 103 ) = 47 which is prime

like that choosing x = 7 and N = 103 will produce a sequence as follows 11, 13, 17, 19, 23, ... w.r.t. choosing n = 1, 2, 3, 4,....

Sunday, July 27, 2008

Kadi Primality Test

Please consider the following results i worked on Prime Number. Following will provide base for primality tests.

Choose lower limit x and upper limit N where x, N belongs to Natural numbers.

Then the following method will generate pseudoprimes between x and N.

Choose PP1 and PP2 which are two contiguous prime numbers greater than x such that PP2 > PP1 for eg., if we choose x = 7 or 8 or 9 or 10 then PP1 = 11 and PP2 = 13

Then exists K1 and K2 such that

K1.x = PP1(mod N)
K2 .x = PP2(mod N) where K1 and K2 can be found by Eucledean algorithm.

For eg., if x = 7 , N = 103 then PP1 = 11 and PP2 = 13

7K1 = 11(mod 103) which impies K1 = 31
7K2 = 13(mod 103) which implies K2 = 46

Then the nth pseudoprime PPn is generated by following equation(Pseudo prime is prime otherwise composite if it proved to be composite)

PPn = Kn.x(mod N) where Kn is calculated as follows




If k1 < k2, d = k2 - k1 then

Kn = (K2 - (d * ( N + 1 - f(n) ))) (mod N) where f(n) is calculated as below


elseif K1 > K2, d = K1 - K2 then

Kn = (K2 + (d * ( N + 1 - f(n) ))) (mod N) where f(n) is calculated as below

where f(n) = 0, if n = 1
= 1, if n = 2
= 3, if n = 3
= 6j + 3, if i = 0, n > 3
= 6j - 2, if i = 1, n > 3
= 6j + 1, if i = 2, r = 0, n> 3
= 6j, if i = 2, r = 1, n > 3

where j = (n -1) / 3, where j belongs to Natural number. for eg., if n = 14 then j = (14 - 1) / 3 = 13/3 = 4;

i = n(mod 3)

r = j(mod2).

Hi Everyone

Welcome to the Fansy of Numbers