antiprime
    Preparing search index...

    Function isAntiprime

    • Determines whether a number is an antiprime: a positive integer with more factors than any smaller positive integer.

      Parameters

      • n: number

        A non-zero safe integer.

      • Optionalpf: readonly PrimeFactor[]

        The prime factorisation of n, if already known; it is checked against n.

      Returns boolean

      true if the absolute value of n is an antiprime; otherwise false.

      Also exported as isHighlyComposite. Negative numbers are judged by their absolute value.

      TypeError If n is not a number, or pf is not an array of prime factor objects.

      RangeError If n is zero, not an integer, or outside the safe integer range, or pf is not the prime factorisation of n.

      1.0.0

      isAntiprime(12); // true
      isAntiprime(-12); // true
      isAntiprime(30); // false
      isAntiprime(12, primeFactors(12)); // true