Nextprime; P2C; Pa2B2 - HP 48gII Advanced User's Reference Manual

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

Advertisement

Flags:
Exact mode must be set (flag –105 clear).
Numeric mode must not be set (flag -3 clear).
Radians mode must be set (flag –17 set).
Example:
Find the product of 2x and 38x
Command:
MULTMOD(2*X,38*X^2)
Result:
X^3

NEXTPRIME

Type:
Function
Description:
Given an integer, returns the next prime number larger than the integer. Like ISPRIME?, it
uses a pseudoprime check for large numbers.
Arithmetic, !Þ
Access:
Input:
An integer or an expression that evaluates to an integer.
Output:
The next prime number larger than the integer.
Example:
Find the closest, larger prime number to 145.
Command:
NEXTPRIME(145)
Result:
149
See also:
ISPRIME?, PREVPRIME

P2C

Type:
Command
Description:
Takes a list representing a permutation as an argument, and returns the permutation
decomposed into lists that represent cycles.
Access:
Input:
A list representing a permutation. For example, the list {3,1,2,5,4} defines a permutation
such that
Output:
Level 2/Item 1:A list of cycles equivalent to the permutation. For example, the list {3,1,2,5,4}
defines a cycle
Level 1, Item 2: The signature of the permutation, 1 or -1.
Example:
Convert the permutation given by {3,4,5,2,1} into cycles:
Command:
P2C({3,4,5,2,1})
Result:
{{{1,3,5},{2,4}},-1}
See also:
C2P, CIRC

PA2B2

Type:
Function
Description:
Takes a prime number, p, such that p=2 or
ib such that p = a
Arithmetic, !Þ
Access:
Input:
A prime number, p, such that p=2 or
Output:
A Gaussian integer a+ib such that p=a
Flags:
Exact mode must be set (flag –105 clear).
Numeric mode must not be set (flag -3 clear).
Complex mode must be set (flag –103 set).
, modulo the default modulus, 3.
2
L
INTEGER
PERM
P(1)=3, P(2)=1, P(3)=2, P(4)=5,
, such that
C
C(3)=1, C(1)=2, C(2)=5, C(5)=4,
+ b
. This function is useful for factorizing Gaussian integers.
2
2
L
INTEGER
and
P(5)=4
and
p 1
modulo 4, and returns a Gaussian integer a +
p 1
modulo 4
+b
2
2
Computer Algebra Commands 4-55
P
C(4)=3
,

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

49g+

Table of Contents