code: def is_lucas_prp(n):
      """Standard Lucas compositeness test with Selfridge parameters.  Returns
      False if n is definitely composite, and True if n is a Lucas probable
      prime.
  
      This is typically used in combination with the Miller-Rabin test.
  
      References
      ==========
      .. [1] Robert Baillie, Samuel S. Wagstaff, Lucas Pseudoprimes,
             Math. Comp. Vol 35, Number 152 (1980), pp. 1391-1417,
             https://doi.org/10.1090%2FS0025-5718-1980-0583518-6
             http://mpqs.free.fr/LucasPseudoprimes.pdf
      .. [2] OEIS A217120: Lucas Pseudoprimes
             https://oeis.org/A217120
      .. [3] https://en.wikipedia.org/wiki/Lucas_pseudoprime
  
      Examples
      ========
  
      >>> from sympy.ntheory.primetest import isprime, is_lucas_prp
      >>> for i in range(10000):
      ...     if is_lucas_prp(i) and not isprime(i):
      ...         print(i)
      323
      377
      1159
      1829
      3827
      5459
      5777
      9071
      9179
      """
      n = as_int(n)
      if n < 2:
          return False
      return is_selfridge_prp(n)
  
imports: from itertools import count
  from sympy.core.sympify import sympify
  from sympy.external.gmpy import gmpy, gcd, jacobi, is_square, bit_scan1, is_fermat_prp, is_euler_prp, is_selfridge_prp, is_strong_selfridge_prp, is_strong_bpsw_prp
  from sympy.external.ntheory import _lucas_sequence
  from sympy.utilities.misc import as_int, filldedent
label_desc: Use image node_id 8 for calling a global function with example usage: is_lucas_prp(n) and returns: is_selfridge_prp, False