Creates an instance holding the absolute value of n, which need not be an antiprime.
A non-zero safe integer.
How many factors the value has.
The number of factors of Antiprime.value, including 1 and the value itself.
Finds the prime factorisation of the value.
A new array of new prime factor objects in ascending order, which the caller may change freely.
Alias of Antiprime.isAntiprime.
true if the value has more factors than any smaller positive integer; otherwise false.
Determines whether the value is a superior antiprime.
true if the value is a superior antiprime; otherwise false.
Alias of Antiprime.isSuperiorAntiprime.
true if the value is a superior antiprime; otherwise false.
Finds the smallest antiprime larger than the value.
A new instance holding the next antiprime.
Finds the smallest superior antiprime larger than the value.
A new instance holding the next superior antiprime.
Alias of Antiprime.nextSuperiorAntiprime.
A new instance holding the next superior antiprime.
Finds the largest antiprime smaller than the value.
A new instance holding the previous antiprime.
Alias of Antiprime.previousAntiprime.
A new instance holding the previous antiprime.
Finds the largest superior antiprime smaller than the value.
A new instance holding the previous superior antiprime.
Alias of Antiprime.previousSuperiorAntiprime.
A new instance holding the previous superior antiprime.
A non-zero integer together with its antiprime and superior antiprime status, factors and prime factorisation.
Remarks
Also exported as
HighlyCompositeNumber. Despite the name, an instance can hold any non-zero safe integer: use Antiprime.isAntiprime to check whether its value is an antiprime. The instances returned by Antiprime.nextAntiprime, Antiprime.previousAntiprime, Antiprime.nextSuperiorAntiprime and Antiprime.previousSuperiorAntiprime always hold antiprimes.Negative numbers are judged by their absolute value. Everything except the value is worked out on first use and cached.
Since
1.0.0
Example