integer_exponent function
The exponent of a prime in a whole number.
How to write it
integer_exponent(n, p)
- n
- A whole number. Takes a whole number.
- p
- A prime. Takes a whole number.
Examples
integer_exponent(40, 2)In the solver,
Open in the solverinteger_exponent(40, 2)gives3.
Related functions
- integer_partitions
All the ways to write a whole number as a sum of positive whole numbers.
- factor_integer
Prime factorization of a whole number, as a list of prime and exponent pairs.
- harmonic_number
The n-th harmonic number: 1 + 1/2 + ... + 1/n.
- is_coprime
Test whether two whole numbers have no common divisor above 1.
- from_continued_fraction
The number a continued fraction stands for.
- is_prime
Test whether a whole number is prime.