Here are versions of two programs, POWERMOD and EUCLID, for the TI-83 (or 83Plus) and TI-85 (or -86) calculators. You have to key these in, but then they'll stay in your calculator memory until the batteries run down.
[TI-83 POWERMOD] [TI-85 POWERMOD]
[TI-83 EUCLID] [TI-85 EUCLID]
:Input "BASE: ",B
:Input "EXPONENT: ",P
:Input "MODULUS: ",M
:1X
:While (P>0)
:If ((P/2)int(P/2))
:Then
:B*XX
:X-M*int(X/M)X
:P-1P
:End
:P/2P
:B^2B:B-M*int(B/M)
B
:End
:Disp XThe words and symbols that may be tricky to find are
Input, in the I/O menu;
>, in the TEST menu;
, in the TEST menu;
int(), in the , NUM menu;
While, Then, and End, in the CTL menu;
Disp, in the I/O menu.
:Input "Base: ",B
:Input "Exponent: ",P
:Input "Modulus: ",M
:1x
:While (P>0)
:If (mod(P,2)==1)
:Then
:mod(B*x,M)x
:P-1P
:End
:P/2P
:mod(B^2,M)B
:End
:Disp xThe words and symbols that may be tricky to find are
Input, Disp and the double quote, in the I/O menu;
While, Then, and End, in the CTL menu;
mod() in the , NUM menu.
:Input "A: ",A
:Input "B: ",B
:1S:0
T
:0U:1
V
:While (B0)
:int(A/B)Q
:A-Q*BR
:BA:R
B
:S-Q*UW
:T-Q*VX
:US:W
U:V
T:X
V
:End
:Disp "S",S,"T",T,"GCD",A
The words and symbols that may be tricky to find are
Input and Disp, in the I/O menu;The program prompts for two numbers, A and B, and reports the GCD of A and B, along with numbers S and T such that A*S + B*T equals GCD(A,B).
< and, in the TEST menu;
int(), in the , NUM menu;
While and End, in the CTL menu;
:Input "A: ",A
:Input "B: ",B
:1S:0
T:0
S1:1
T1
:While (B0)
:int(A/B)Q
:A-Q*BR
:BA:R
B
:S-Q*S1S2:T-Q*T1
T2
:S1S:S2
S1:T1
T:T2
T1
:End
:Disp "S",S,"T",T,"GCD",A
The words and symbols that may be tricky to find are
Input, Disp and the double quote, in the I/O menu;The program prompts for two numbers, A and B, and reports the GCD of A and B, along with numbers S and T such that A*S + B*T equals GCD(A,B).
While and End, in the CTL menu;
int() in the , NUM menu.