Download  Print this page

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

Advertisement

Table of Contents

   Also See for HP 39gII

   Related Manuals for HP 39gII

Comments to this Manuals

Symbols: 0
Latest comments:
  • Peterg Dec 29, 2018 01:11:
    Me interesan los Manuales Hp para usarlo en clases