def _lucas_selfridge_params(n):
 from sympy.core import igcd
 from sympy.ntheory.residue_ntheory import jacobi_symbol
 D = 5
 while True:
  g = igcd(abs(D), n)
  if ((g > 1) and (g != n)):
   return (0, 0, 0)
  if (jacobi_symbol(D, n) == (-1)):
   break
  if (D > 0):
   D = ((- D) - 2)
  else:
   D = ((- D) + 2)
 return _int_tuple(D, 1, ((1 - D) / 4))

def _lucas_selfridge_params ( n ) : from sympy . core import igcd from sympy . ntheory . residue_ntheory import jacobi_symbol D = 5 while True : g = igcd ( abs ( D ) , n ) if ( ( g > 1 ) and ( g != n ) ) : return ( 0 , 0 , 0 ) if ( jacobi_symbol ( D , n ) == ( - 1 ) ) : break if ( D > 0 ) : D = ( ( - D ) - 2 ) else : D = ( ( - D ) + 2 ) return _int_tuple ( D , 1 , ( ( 1 - D ) / 4 ) )
calculates the selfridge parameters for n .