HP -32S Owner's Manual page 240

Rpn scientific calculator
Table of Contents

Advertisement

X14 GTO X
Branches to test the potential prime with the
new factor.
Bytes and Checksum: 021.0, 43F2
Flags Used: None.
Memory Required: 50.5 bytes: 34.5 for program, 16 for variables.
Program Instructions:
1. Key in the program routines; press [c] when done.
2. Key in an odd integer.
3. Press IXEQ I P to start program. The prime number, P, will be
displayed.
4. To see the next prime number, press IR/SI.
Variables Used:
P
Prime value and potential prime values.
D
Divisor which is being used to test the current value of P.
Remarks: No tests are made to assure that the input is an odd, posi
tive integer greater than 3.
Example. What is the first prime number after 789? What is the next
prime number?
Keys:
789rxEQ|P
R/S
Display:
P=797.0000
P=809.0000
238
14: Miscellaneous Programs
Description:
Keys in 789 and starts
program; displays first
prime number.
Calculates the next
prime number after
797.

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents