PrimePower

com.phasmidsoftware.number.core.numerical.PrimePower
case class PrimePower(p: Prime, r: Int)

Represents a prime-power factor p^r in a factorisation.

Value parameters

p

the prime base.

r

the exponent (multiplicity).

Attributes

Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

def reducedTotient: BigInt

Computes the reduced totient value for a prime-power factor p^r. The reduction is applied when the base is 2 and the exponent is 3 or greater. In such cases, the result is half of Euler's Totient function value for p^r.

Computes the reduced totient value for a prime-power factor p^r. The reduction is applied when the base is 2 and the exponent is 3 or greater. In such cases, the result is half of Euler's Totient function value for p^r.

Attributes

Returns

a BigInt representing the reduced totient value for p^r.

def totient: BigInt

Computes Euler's Totient function for the prime-power factor p^r. The result is the count of integers less than p^r that are coprime to it.

Computes Euler's Totient function for the prime-power factor p^r. The result is the count of integers less than p^r that are coprime to it.

Attributes

Returns

a BigInt representing the value of Euler's Totient function for p^r.

Inherited methods

def productElementNames: Iterator[String]

An iterator over the names of all the elements of this product.

An iterator over the names of all the elements of this product.

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

An iterator over all the elements of this product.

An iterator over all the elements of this product.

Attributes

Returns

in the default implementation, an Iterator[Any]

Inherited from:
Product