code: def is_strong_lucas_prp(n, p, q):
      D = p**2 - 4 * q
      if D == 0:
          raise ValueError(
              "invalid values for p,q in is_strong_lucas_prp()"
          )
      if n < 1:
          raise ValueError(
              "is_selfridge_prp() requires 'n' be greater than 0"
          )
      if n == 1:
          return False
      if n % 2 == 0:
          return n == 2
      if gcd(n, q * D) not in [1, n]:
          raise ValueError(
              "is_strong_lucas_prp() requires gcd(n,2*q*D) == 1"
          )
      j = jacobi(D, n)
      s = bit_scan1(n - j)
      U, V, Qk = _lucas_sequence(n, p, q, (n - j) >> s)
      if U == 0 or V == 0:
          return True
      for _ in range(s - 1):
          V = (V * V - 2 * Qk) % n
          if V == 0:
              return True
          Qk = pow(Qk, 2, n)
      return False
  
imports: import sys
  import math
  import mpmath.libmp
label_desc: Use image node_id 24 for calling a global function with example usage: is_strong_lucas_prp(n, p, q) and returns: False, False, unknown, True, True