up previous next
FactorMultiplicity

multiplicity of a factor of an integer

Syntax
FactorMultiplicity(b: INT, N: INT): INT

Description
This function counts how many times the integer base b divides a given integer N . NOTE: N must be non-zero, and b < 2 .

Example
/**/  type(20/2);
INT
/**/  type(20/7);
RAT
/**/  FactorMultiplicity(2, 20);
2
/**/  FactorMultiplicity(5, 20);
1
/**/  FactorMultiplicity(7, 20);
0

See Also