HP 39gII User Manual page 179

Graphing calculator
Hide thumbs Also See for 39gII:
Table of Contents

Advertisement

isprime
ithprime
nextprime
powmod
prevprime
euler
Using mathematical functions
Prime integer test. Returns 1 if the integer a is prime;
otherwise, returns 0.
isprime(a)
Example:
isprime(1999) returns 1.
Nth prime. For the integer n, returns the nth prime number
less than 10,000.
ithprime(n)
Example:
ithprime(5) returns 1 1.
Next prime. Returns the next prime number after the
integer a.
nextprime(a)
Example:
nextprime(1 1) returns 13.
Power and modulo. For the integers a, n, and p, returns
n
modp.
a
powmod(a, n, p)
Example:
powmod(5, 2, 13) returns 12.
Previous prime. Returns the previous prime number before
the integer a.
prevprime(a)
Example:
prevprime(1 1) returns 7.
Euler's phi (or totient) function. Takes a positive integer x
and returns the number of positive integers less than or
equal to x that are coprime to x.
euler(x)
Example:
euler(6) returns 2.
169

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents