Predrag Terzic on Wed, 26 Aug 2020 10:34:41 +0200


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Probabilistic primality test using Chebyshev polynomials of the first kind


Is it possible to implement  the following probabilistic primality test in PARI/GP?

input: An odd natural number n 
  1. If n is a perfect square output: composite
  2. Find the smallest odd prime number c such that jacobisymbol(c,n)=-1
  3. If T_n(1+sqrt(c))==1-sqrt(c) (mod n) then output: probably prime , else output: composite
The first two steps are not a problem, the third step is problematic. I don't know how to implement a congruence that involves square roots. Note that T_n(x) denotes  Chebyshev polynomial of the first kind.

Best regards,

Pedja