|
D.12.2.14 Atkin
Procedure from library atkins.lib (see atkins_lib).
- Return:
- 1, if N is prime,
-1, if N is not prime,
0, if the algorithm is not applicable, since there are too few discriminants
- Assume:
- N is coprime to 6 and different from 1
- Note:
- K/2 is input for the procedure "disc",
K is input for the procedure "HilbertClassPoly",
B describes the number of recursions being calculated.
The basis of the algorithm is the following theorem:
Let N be an integer coprime to 6 and different from 1 and E be an
ellipic curve modulo N. Assume that we know an integer m and a
point P of E(Z/NZ) satisfying the following conditions.
(1) There exists a prime divisor q of m such that q > (4-th root(N)+1)^2.
(2) m*P = O(E) = (0:1:0).
(3) (m/q)*P = (x:y:t) with t element of (Z/NZ)*.
Then N is prime.
Example:
| LIB "atkins.lib";
ring R = 0,x,dp;
Atkin(7691,100,5);
==> 1
Atkin(3473,10,2);
==> -1
printlevel=1;
Atkin(10000079,100,2);
==> Set i = 0, n = 0 and N(i) = N(0)= 10000079.
==> pause>
==> List H of possibly suitable discriminants will be calculated.
==> H = -3,-4,-7,-8,-11,-12,-15,-16,-19,-20,-23,-24,-27,-28,-31,-32,-35,-36,-\
39,-40,-43,-44,-47,-48,-51,-52,-55,-56,-59,-60,-63,-64,-67,-68,-71,-72,-7\
5,-76,-79,-80,-83,-84,-87,-88,-91,-92,-95,-96,-99,-100,-103,-104,-107,-10\
8,-111,-112,-115,-116,-119,-120,-123,-124,-127,-128,-131,-132,-135,-136,-\
139,-140,-143,-144,-147,-148,-151,-152,-155,-156,-159,-160,-163,-164,-167\
,-168,-171,-172,-175,-176,-179,-180,-183,-184,-187,-188,-191,-192,-195,-1\
96,-199,-200
==> pause>
==> Next discriminant D will be chosen. D = -3.
==> pause>
==> Jacobi(D,N(0)) = -1
==> pause>
==> Next discriminant D will be chosen. D = -4.
==> pause>
==> Jacobi(D,N(0)) = -1
==> pause>
==> Next discriminant D will be chosen. D = -7.
==> pause>
==> Jacobi(D,N(0)) = -1
==> pause>
==> Next discriminant D will be chosen. D = -8.
==> pause>
==> Jacobi(D,N(0)) = -1
==> pause>
==> Next discriminant D will be chosen. D = -11.
==> pause>
==> The solution (x,y) of the equation x^2+|D|y^2 = 4N(0) is
==> [1]:
==> 4596
==> [2]:
==> 1310
==> pause>
==> List L2 of possible m = |E(Z/N(0)Z)| will be calculated.
==> L2 =
==> [1]:
==> 10004676
==> [2]:
==> 9995484
==> pause>
==> List S of factors of all possible m will be calculated.
==> S=
==> [1]:
==> [1]:
==> 10004676
==> [2]:
==> [1]:
==> 11
==> [2]:
==> 2
==> [3]:
==> 3
==> [4]:
==> 75793
==> [5]:
==> 12
==> [2]:
==> [1]:
==> 9995484
==> [2]:
==> [1]:
==> 3
==> [2]:
==> 832957
==> [3]:
==> 2
==> [4]:
==> 3
==> pause>
==> Suitable pair (m,q) has been found such that q|m,
==> q > (4-th root(N(0))+1)^2 and q passes the Miller-Rabin-Test.
==> m = 10004676,
==> q = 75793
==> pause>
==> The minimal polynomial T of j((D+sqr(D))/2) in Z[X] will be calculated fo\
r D=-11.
==> T = x+32768
==> pause>
==> Set T = T mod N(0).
==> T = x+32768
==> pause>
==> The zero of T modulo N(0) is
==> [1]:
==> -32768
==> pause>
==> Choose the zero j = -32768 and set
==> c = j/(j-1728) mod N(0), a = -3c mod N(0), b = 2c mod N(0).
==> a = 2374784,
==> b = 5083530
==> pause>
==> g = 3035792
==> pause>
==> A random point P on the elliptic curve corresponding
==> to the equation y^2 = x^3+ax+b for
==> N(0) = 10000079,
==> a = 2374784,
==> b = 5083530
==> will be chosen.
==> P = (2776172,3288655,1)
==> pause>
==> The points P2 = (m/q)*P and P1 = q*P2 on the curve will be calculated.
==> P1 = (6511549,5541835,1),
==> P2 = (6106160,8946469,1)
==> pause>
==> Since P1 != (0:1:0), it holds m != |E(Z/N(0)Z)| for the coefficients a = \
2374784 and b = 5083530.
==> Therefore choose new coefficients a and b.
==> pause>
==> Since D < -4, set a = a*g^2 mod N(0) and b = b*g^3 mod N(0).
==> a = 1185224,
==> b = 3258230,
==> k = 1
==> pause>
==> A random point P on the elliptic curve corresponding
==> to the equation y^2 = x^3+ax+b for
==> N(0) = 10000079,
==> a = 1185224,
==> b = 3258230
==> will be chosen.
==> P = (3401270,6866912,1)
==> pause>
==> The points P2 = (m/q)*P and P1 = q*P2 on the curve will be calculated.
==> P1 = (0,1,0),
==> P2 = (85781,4173051,1)
==> pause>
==> 1. Recursion:
==>
==> N(0) = 10000079 suffices the conditions of the underlying theorem,
==> since P1 = (0:1:0) and P2[3] in (Z/N(0)Z)*.
==>
==> Now check if also the found factor q=75793 suffices these assumptions.
==> Therefore set i = i+1, N(1) = q = 75793 and restart the algorithm.
==> pause>
==> Next discriminant D will be chosen. D = -3.
==> pause>
==> The solution (x,y) of the equation x^2+|D|y^2 = 4N(1) is
==> [1]:
==> 542
==> [2]:
==> 56
==> pause>
==> List L2 of possible m = |E(Z/N(1)Z)| will be calculated.
==> L2 =
==> [1]:
==> 76336
==> [2]:
==> 75252
==> [3]:
==> 76149
==> [4]:
==> 75439
==> [5]:
==> 75981
==> [6]:
==> 75607
==> pause>
==> List S of factors of all possible m will be calculated.
==> S=
==> [1]:
==> [1]:
==> 76336
==> [2]:
==> [1]:
==> 13
==> [2]:
==> 367
==> [3]:
==> 2
==> [4]:
==> 367
==> [2]:
==> [1]:
==> 75252
==> [2]:
==> [1]:
==> 3
==> [2]:
==> 6271
==> [3]:
==> 2
==> [4]:
==> 12
==> [3]:
==> [1]:
==> 76149
==> [2]:
==> [1]:
==> 3
==> [2]:
==> 8461
==> [3]:
==> 3
==> [4]:
==> [1]:
==> 75439
==> [2]:
==> [1]:
==> 7
==> [2]:
==> 13
==> [3]:
==> 829
==> [4]:
==> 75439
==> [5]:
==> [1]:
==> 75981
==> [2]:
==> [1]:
==> 19
==> [2]:
==> 31
==> [3]:
==> 43
==> [4]:
==> 3
==> [5]:
==> 75981
==> [6]:
==> [1]:
==> 75607
==> [2]:
==> [1]:
==> 7
==> [2]:
==> 1543
==> [3]:
==> 75607
==> pause>
==> Suitable pair (m,q) has been found such that q|m,
==> q > (4-th root(N(1))+1)^2 and q passes the Miller-Rabin-Test.
==> m = 76336,
==> q = 367
==> pause>
==> Since D = -3, set a = 0 and b = -1.
==> pause>
==> g = 15675
==> pause>
==> A random point P on the elliptic curve corresponding
==> to the equation y^2 = x^3+ax+b for
==> N(1) = 75793,
==> a = 0,
==> b = -1
==> will be chosen.
==> P = (6739,21159,1)
==> pause>
==> The points P2 = (m/q)*P and P1 = q*P2 on the curve will be calculated.
==> P1 = (58298,43364,1),
==> P2 = (75424,29911,1)
==> pause>
==> Since P1 != (0:1:0), it holds m != |E(Z/N(1)Z)| for the coefficients a = \
0 and b = -1.
==> Therefore choose new coefficients a and b.
==> pause>
==> Since D = -3, set b = b*g mod N(1).
==> a = 0,
==> b = -15675,
==> k = 1
==> pause>
==> A random point P on the elliptic curve corresponding
==> to the equation y^2 = x^3+ax+b for
==> N(1) = 75793,
==> a = 0,
==> b = -15675
==> will be chosen.
==> P = (44443,30044,1)
==> pause>
==> The points P2 = (m/q)*P and P1 = q*P2 on the curve will be calculated.
==> P1 = (57592,64619,1),
==> P2 = (65526,31623,1)
==> pause>
==> Since P1 != (0:1:0), it holds m != |E(Z/N(1)Z)| for the coefficients a = \
0 and b = -15675.
==> Therefore choose new coefficients a and b.
==> pause>
==> Since D = -3, set b = b*g mod N(1).
==> a = 0,
==> b = -60512,
==> k = 2
==> pause>
==> A random point P on the elliptic curve corresponding
==> to the equation y^2 = x^3+ax+b for
==> N(1) = 75793,
==> a = 0,
==> b = -60512
==> will be chosen.
==> P = (46843,52174,1)
==> pause>
==> The points P2 = (m/q)*P and P1 = q*P2 on the curve will be calculated.
==> P1 = (49909,3260,1),
==> P2 = (37869,50319,1)
==> pause>
==> Since P1 != (0:1:0), it holds m != |E(Z/N(1)Z)| for the coefficients a = \
0 and b = -60512.
==> Therefore choose new coefficients a and b.
==> pause>
==> Since D = -3, set b = b*g mod N(1).
==> a = 0,
==> b = 23795,
==> k = 3
==> pause>
==> A random point P on the elliptic curve corresponding
==> to the equation y^2 = x^3+ax+b for
==> N(1) = 75793,
==> a = 0,
==> b = 23795
==> will be chosen.
==> P = (32297,22617,1)
==> pause>
==> The points P2 = (m/q)*P and P1 = q*P2 on the curve will be calculated.
==> P1 = (0,1,0),
==> P2 = (17725,53258,1)
==> pause>
==> 2. Recursion:
==>
==> N(1) = 75793 suffices the conditions of the underlying theorem,
==> since P1 = (0:1:0) and P2[3] in (Z/N(1)Z)*.
==>
==> Now check if also the found factor q=367 suffices these assumptions.
==> Therefore set i = i+1, N(2) = q = 367 and restart the algorithm.
==> pause>
==> 1
==> >
|
|