antiprime
    Preparing search index...

    Function isPrimeExponentsReducing

    • Determines whether the exponents of a prime factorisation never increase from smaller to larger primes.

      Parameters

      Returns boolean

      true if each exponent is no larger than the one before it; otherwise false.

      This is one of the tests every antiprime candidate passes. The empty factorisation of 1 passes trivially.

      TypeError If pf is not an array of objects with numeric factor and exponent properties.

      RangeError If pf is not a prime factorisation: ascending distinct primes with positive integer exponents.

      1.0.0

      isPrimeExponentsReducing(primeFactors(12)); // true: 2² × 3
      isPrimeExponentsReducing(primeFactors(18)); // false: 2 × 3²