This program factors integers into prime components. ----begin documentation---- This 82u-file was prepared by Mikael Bonnier, http://www.df.lth.se.orbin.se/~mikaelb/. **************************** * FACTOR.82P for the TI-82 * **************************** ACKNOWLEDGMENT FACTOR.82P was written by John Powers of the TI Graphics Team and is released to the public domain. You may copy and change this program. INTRODUCTION This program produces a list of the prime factors of a given integer. The list is displayed in the form of factor/power pairs. HOW TO USE FACTOR Execute FACTOR to begin the program. A prompt for the integer to factor then appears: N=? Enter an integer. The integer's factors are then displayed. For example, to factor 1584: prgmFACTOR N=?1584 {2 4 3 2 11 1} The factors of 1584 are 2^4 * 3^2 * 11. ----begin ascii---- \START82\ \COMMENT=Program file dated 05/26/93, 09:53 \NAME=FACTOR \FILE=FACTOR.82P :0\->\dim \L1\ :Prompt N :1\->\S :2\->\F :0\->\E :\sqrt\N\->\M :While F\<=\M :While fPart (N/F)=0 :E+1\->\E :N/F\->\N :End :If E>0:Then :F\->\\L1\(S) :E\->\\L1\(S+1) :S+2\->\S :0\->\E :\sqrt\N\->\M :End :If F=2 :Then:3\->\F :Else:F+2\->\F :End :End :If N\<>\1:Then :N\->\\L1\(S) :1\->\\L1\(S+1) :End :\L1\ \STOP82\ ----begin uue---- begin 644 FACTOR.82P M*BI423@R*BH:"@!0