 
 
 
 
 
   
William Stein
Date: Math 124  HARVARD UNIVERSITY
 HARVARD UNIVERSITY  Fall 2001
 Fall 2001
 , since
, since 
 .  Now
assume that
.  Now
assume that  is an integer such that
 is an integer such that 
 .  
If there is a prime
.  
If there is a prime  such that
 such that 
 
 and
 and 
 , so
, so 
 and
 and
 , hence
, hence 
 which contradicts our inductive assumption. 
Thus no such prime
 
which contradicts our inductive assumption. 
Thus no such prime  exists, and
 exists, and 
 .
.
Second proof (using continued fractions): Consider the periodic
continued fraction 
![$ [1,1,1,...]$](img14.png) .  The
.  The  th convergent to this
continued fraction is
th convergent to this
continued fraction is  , where
, where  and
 and  are defined by
the recurrence
 are defined by
the recurrence 
 ,
, 
 , and
, and
 ,
,  ,
,  .  As observed in Lecture 17,
.  As observed in Lecture 17, 
 .  Now just notice that
.  Now just notice that 
 and
 and 
 .
.
 be the set of elements in
 be the set of elements in 
 of order
dividing
 of order
dividing  , and let
, and let  be the complement of
 be the complement of  in
 in 
 , so
, so 
 
 then
 then  also lies in
 also lies in  and
 and 
 ,
so
,
so 
 ,
and
,
and
 , where
, where  is the subgroup of 
elements of order dividing
 is the subgroup of 
elements of order dividing  .  Using the Chinese Remainder Theorem,
write
.  Using the Chinese Remainder Theorem,
write 
 
 is the prime factorization of
 is the prime factorization of  .  Since
each
.  Since
each  is odd, problem 4 of this exam implies that
 is odd, problem 4 of this exam implies that 
 is
cyclic, so
 is
cyclic, so  is the only element it contains of order
 is the only element it contains of order  .
.  
Thus the group  is isomorphic to the
 is isomorphic to the 
 -vector space
-vector space
 , where again
, where again  is the number of prime factors of
 is the number of prime factors of  .  By a
careful induction we see that
.  By a
careful induction we see that 
 if and only
if
 if and only
if  .  To see this, check the cases
.  To see this, check the cases  directly.  For
 directly.  For  , write
, write
 as a union of two
 as a union of two  -dimensional hyperplanes, the
elements of each of which sum to 0, by the inductive hypothesis.
Thus
-dimensional hyperplanes, the
elements of each of which sum to 0, by the inductive hypothesis.
Thus 
 
 directly,
so you can verify computationally that the above result is plausible:
 directly,
so you can verify computationally that the above result is plausible:
f(n)=local(s);s=1;for(x=1,n,if(gcd(x,n)==1,s=(s*x)%n));return(s);
 
 modulo
 modulo 
 , 
which is
, 
which is 
 
 .
.
 has order
 has order 
 
 is cyclic by
proving that
 is cyclic by
proving that  contains an element of order
 contains an element of order 
 ,
and we'll do this by showing that
,
and we'll do this by showing that  contains an element of order
 contains an element of order
 and one of order
 and one of order  .
.
In Lecture 11, we proved that the group
 of order
 of order  is cyclic,
so since the homomorphism
 is cyclic,
so since the homomorphism 
 is surjective, there is an
is surjective, there is an 
 of
order a multiple of
 of
order a multiple of  .  Then
.  Then 
 has order
 
has order  .
Next, letting
.
Next, letting  , the binomial theorem implies that
, the binomial theorem implies that
|  |  | |
|  | 
 , we have
, we have
 .  (This argument fails
when
.  (This argument fails
when  ; e.g., if
; e.g., if  and
 and  , then
the right-most binomial coefficient is not divisible by
, then
the right-most binomial coefficient is not divisible by  .)
Since
.)
Since 
 , we see that
, we see that  has order
 
has order  .  Thus
.  Thus  has order
 has order 
 ,
which proves that
,
which proves that 
 is cyclic.
 is cyclic.
[If you're worried about that binomial expansion, the following
remark by ``A. Student'' might prove helpful: For  we 
have
 we 
have 
 , because
, because
 and the power of
 and the power of  in the factorization of
 in the factorization of  satisfies
 satisfies
       
 .]
.]
![$ \alpha = [0,\overline{1,4}]$](img86.png) .  Then
.  Then
 
 
 , hence
, hence
 , and
, and 
 .
Thus
.
Thus 
![$ [3,\overline{1,4}] = 3 + (-2+2\sqrt{2}) = 1+2\sqrt{2}$](img91.png) .
As a check, type contfrac(1+2*sqrt(2)) into PARI.
.
As a check, type contfrac(1+2*sqrt(2)) into PARI.
 should equal
 should equal 
![$ [\overline{1,6,3,1}]$](img93.png) . 
To prove this, we have to do the algebra as in part (i).
We have
. 
To prove this, we have to do the algebra as in part (i).
We have 
![$\displaystyle \alpha = [\overline{1,6,3,1}] =
1+\frac{1}{6+\frac{1}{3+\frac{1}{1+\frac{1}{\alpha}}}}.
$](img94.png) 
 
 
 ,
, 
 
 were small, this problem would be completely trivial
to solve using a simple PARI command like
 were small, this problem would be completely trivial
to solve using a simple PARI command like
ss(n) = for(x=1,floor(sqrt(n)),if(issquare(n-x^2),print(x)))However, ss(m) will take an extraordinarily long time to terminate, so instead we use the proof that integers of a certain form are a sum of two squares. First, factor
 using, e.g.,
the PARI command factor:
 using, e.g.,
the PARI command factor:
 
 modulo
 modulo  ,
so each is a sum of two squares.  The following representations
were found using the PARI command ss above:
,
so each is a sum of two squares.  The following representations
were found using the PARI command ss above:
|  |  | |
|  |  | |
|  |  | 
 
? (4153+12410*I)*(14460+23441*I)*(17946+22261*I) %14 = -10304665980833 - 171525258172*IThus
 
? r=reducedforms(-888)  
%2 = [[1, 0, 222], [11, -6, 21], [11, 6, 21], [13, -10, 19], 
      [13, 10, 19], [14, -8, 17], [14, 8, 17], [2, 0, 111], 
      [3, 0, 74], [6, 0, 37], [7, -6, 33], [7, 6, 33]]
Thus the class group has order  .  Since
composition(r[1],r[1]) is r[1], the form
.  Since
composition(r[1],r[1]) is r[1], the form  is
the identity of the group.  There are exactly two isomorphism classes
of abelian groups
of order
 is
the identity of the group.  There are exactly two isomorphism classes
of abelian groups
of order  : one is represented by
: one is represented by 
 and the other by
 
and the other by 
 .
To decide which is our class group, we compute the order of each element.
.
To decide which is our class group, we compute the order of each element.
? for(n=1,12,print1(orderform(r[n],r[1])," ")) 1 6 6 6 6 6 6 2 2 2 3 3Since no element has order
 , the class group must be
, the class group must be
 
 :
:
? e = ellinit([0,-4,0,0,16]) ? forprime(p=3,30,if(p!=11,print1(p+1-ellap(e,p),", "))) 5, 5, 10, 10, 20, 20, 25, 30, \\ 3 5 7 13 17 19 23 29
 as follows:
 as follows:
? q*prod(n=1,30,(1-q^n)^2)*prod(n=1,3,(1-q^(11*n))^2)  + O(q^30)  
%22 = q - 2*q^2 - q^3 + 2*q^4 + q^5 + 2*q^6 - 2*q^7 - 2*q^9 - 2*q^10
        + q^11 - 2*q^12 + 4*q^13 + 4*q^14 - q^15 - 4*q^16 - 2*q^17 
        + 4*q^18 + 2*q^20 + 2*q^21 - 2*q^22 - q^23 - 4*q^25 - 8*q^26 
        + 5*q^27 - 4*q^28 + O(q^30)
 
 , we have
, we have 
 .
(Note that we are not required to prove this!)
.
(Note that we are not required to prove this!)
 :
:
? forprime(p=3,30,print1(p+1-ellap(e,p)," ")) 4 4 8 12 20 16 20 24 20
 for
 for 
 , so
we conjecture in general that this relation holds.   We now prove
this conjecture.  Supposing
, so
we conjecture in general that this relation holds.   We now prove
this conjecture.  Supposing 
 , we must count the number
of points on
, we must count the number
of points on 
 with coordinates in
 with coordinates in 
 .
Since
.
Since 
 , we have
, we have
 , i.e.,
, i.e.,  is not a perfect square. 
Thus if
 is not a perfect square. 
Thus if 
 and
 and  is nonzero, then
exactly one of
 is nonzero, then
exactly one of  or
 or 
 is
a perfect square.  Since
 is
a perfect square.  Since 
 and, as just
noted,
 and, as just
noted,  has no root in
 has no root in 
 , the cubic is 0 only
when
, the cubic is 0 only
when  .  Thus the points on
.  Thus the points on  are as follows:
the point at infinity, the point
are as follows:
the point at infinity, the point  , and points
, and points  where
where  runs through exactly half of the nonzero elements
of
 runs through exactly half of the nonzero elements
of 
 .  There are thus
.  There are thus 
 points
on
 points
on  over
 over 
 .
.
{ECM(N, m)= local(E);
   E = ellinit([0,0,0,random(N),1]*Mod(1,N));
   print("E: y^2 = x^3 + ",lift(E[4]),"x+1,  P=[0,1]");
   ellpow(E,[0,1]*Mod(1,N),m);  \\ this fails if and only if we win!
}
{lcmfirst(B) =  
   local(L,i); L=1; for(i=2,B,L=lcm(L,i));
   return(L);
}
I'm going to start with lcmfirst(10000), though you might
have choosen something different for  .
.
? m = lcmfirst(10000); ? N = 124531325385603661726997; ? ECM(N,m) E: y^2 = x^3 + 90450397866599611397131x+1, P=[0,1] *** impossible inverse modulo: Mod(495899, 124531325385603661726997).We have thus split
 :
:
 
? ECM(N/495899,m) E: y^2 = x^3 + 35484437310832518x+1, P=[0,1] *** impossible inverse modulo: Mod(311221384171, 251122356337890703).Thus
 
? isprime(495899,1) %5 = 1 ? isprime(311221384171,1) %6 = 0 ? isprime(806893,1) %7 = 1
When we try ECM on the second factor, it fails a few times, then succeeds:
? ECM(311221384171,m) E: y^2 = x^3 + 246181556758x+1, P=[0,1] %8 = [0] ? ECM(311221384171,m) E: y^2 = x^3 + 163571326944x+1, P=[0,1] %9 = [Mod(20641240315, 311221384171), Mod(200682828122, 311221384171)] ? ECM(311221384171,m) E: y^2 = x^3 + 255080864418x+1, P=[0,1] *** impossible inverse modulo: Mod(888161, 311221384171).Thus
 
? factor(N) %11 = [350411 1] [495899 1] [806893 1] [888161 1]
 
 
 
 
