def _lucas_extrastrong_params(n):
 from sympy.core import igcd
 from sympy.ntheory.residue_ntheory import jacobi_symbol
 (P, Q, D) = (3, 1, 5)
 while True:
  g = igcd(D, n)
  if ((g > 1) and (g != n)):
   return (0, 0, 0)
  if (jacobi_symbol(D, n) == (-1)):
   break
  P += 1
  D = ((P * P) - 4)
 return _int_tuple(D, P, Q)

def _lucas_extrastrong_params ( n ) : from sympy . core import igcd from sympy . ntheory . residue_ntheory import jacobi_symbol ( P , Q , D ) = ( 3 , 1 , 5 ) while True : g = igcd ( D , n ) if ( ( g > 1 ) and ( g != n ) ) : return ( 0 , 0 , 0 ) if ( jacobi_symbol ( D , n ) == ( - 1 ) ) : break P += 1 D = ( ( P * P ) - 4 ) return _int_tuple ( D , P , Q )
calculates the "extra strong" parameters for n .