Number Theory
ISPRIME
Synopsis
ISPRIME(n)
Arguments
n: positive integer
Description
ISPRIME returns TRUE if n is prime and FALSE otherwise.
ITHPRIME
Synopsis
ITHPRIME(i)
Arguments
i: positive integer
Description
ITHPRIME finds the ith prime.
NT_D
Synopsis
NT_D(n)
Arguments
n: positive integer
Description
NT_D calculates the number of divisors of n.
NT_MU
Synopsis
NT_MU(n)
Arguments
n: positive integer
Description
NT_MU function (Möbius mu function) returns 0 if n is divisible by the square of a prime. Otherwise, if n has an odd number of different prime factors, NT_MU returns -1, and if n has an even number of different prime factors, it returns 1. If n = 1, NT_MU returns 1.
NT_PHI
Synopsis
NT_PHI(n)
Arguments
n: positive integer
Note
Euler's totient function gives the number of integers less than or equal to n that are relatively prime (coprime) to n.
NT_PI
Synopsis
NT_PI(n)
Arguments
n: positive integer
Description
NT_PI returns the number of primes less than or equal to n.
NT_SIGMA
Synopsis
NT_SIGMA(n)
Arguments
n: positive integer
Description
NT_SIGMA calculates the sum of the divisors of n.