Using mathematical functions
169
isprime
Prime integer test. Returns 1 if the integer
a
is prime;
otherwise, returns 0.
isprime
(
a
)
Example:
isprime
(1999) returns 1.
ithprime
Nth prime. For the integer
n
, returns the nth prime number
less than 10,000.
ithprime
(
n
)
Example:
ithprime
(5) returns 11.
nextprime
Next prime. Returns the next prime number after the
integer a.
nextprime
(
a
)
Example:
nextprime
(11) returns 13.
powmod
Power and modulo. For the integers
a
,
n
, and
p
, returns
mod
p
.
powmod
(
a, n, p
)
Example:
powmod
(5, 2, 13) returns 12.
prevprime
Previous prime. Returns the previous prime number before
the integer a.
prevprime
(
a
)
Example:
prevprime
(11) returns 7.
euler
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.
a
n
Содержание 39gII
Страница 1: ...HP 39gII graphing calculator user s guide Edition1 Part Number NW249 90001 ...
Страница 2: ...Printing History Edition 1 November 201 1 ...
Страница 32: ...22 Getting started ...
Страница 58: ...48 Apps and their views ...
Страница 70: ...60 Function app ...
Страница 80: ...70 Solve app ...
Страница 132: ...122 Parametric app your own table and the split screen functionality available in the Function app ...
Страница 136: ...126 Polar app ...
Страница 140: ...130 Sequence app ...
Страница 148: ...138 Finance app ...
Страница 152: ...142 Linear Solver app ...
Страница 218: ...208 Matrices ...
Страница 226: ...216 Notes and Info ...
Страница 238: ...228 Variables and memory management ...
Страница 318: ...308 Programming ...
Страница 340: ...330 Reference information ...
Страница 346: ...vi Product Regulatory Information ...