I saw this program while looking for something to help me in math class with radicals, and I found this:

**Number Factorization**

```
:{1→L₁
:Repeat Ans=1
:2:While fPart(X/Ans
:Ans+1
:End
:Ans→L₁(1+dim(L₁
:X/Ans→X
:End
```

I made that into a prime number generator:

```
1→X
While 1
X+1→X
2:While fPart(X/Ans
Ans+1
End
If X=Ans:Disp X:End
```

That works fine, but I found one made a while back in ticalc that works 3 times faster than mine (I timed it)

```
For(T,3,9e99,2
For(A,2,√(T
If T/A=int(T/A:T→A
End
If A<T:Disp T
End
```

I was thinking about a way to make the prime factorization faster. The line that has

`Ans+1`

Could be replaced with the faster prime number generator to add to the next prime number instead of adding 1 and checking to see if that works? Would that be faster, or would the extra coding just slow it down?

I've trying making something out of it, but it hasn't worked for me yet.