336 Functions and commands
Previous Prime Returns the prime or pseudo-prime number closest to but
smaller than an integer.
prevprime(Intg(a))
Example:
prevprime(11) returns 7
Euler Compute’s Euler's totient for an integer.
euler(Intg(n))
Example:
euler(6) returns 2
Division
Quotient Returns the integer quotient of the Euclidean division of two
integers.
iquo(Intg(a),Intg(b))
Example:
iquo(46, 23) returns 2
Remainder Returns the integer remainder from the Euclidean division of
two integers.
irem(Intg(a),Intg(b))
Example:
irem(46, 23) returns 17
a
n
MOD p Returns a
n
modulo p in [0;p−1].
powmod(Intg(a),Intg(n),Intg(p),[Expr(P(x
))],[Var])
Example:
powmod(5,2,13) returns 12
Chinese
Remainder
Returns the Chinese remainder of two lists of integers.
ichinrem(LstIntg(a,p),LstIntg(b,q))
Example:
ichinrem([2, 7], [3, 5]) returns [-12, 35]