code: async function isProbablePrime(n, e, k) {
    if (e && !n.subn(1).gcd(e).eqn(1)) {
      return false;
    }
    if (!divisionTest(n)) {
      return false;
    }
    if (!fermat(n)) {
      return false;
    }
    if (!await millerRabin(n, k)) {
      return false;
    }
    // TODO implement the Lucas test
    // See Section C.3.3 here: https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.186-4.pdf
    return true;
  }
docs: Probabilistic primality testing
  @param {BN}      n Number to test
  @param {BN}      e Optional RSA exponent to check against the prime
  @param {Integer} k Optional number of iterations of Miller-Rabin test
  @returns {boolean}
  @async