I'm an amateur but I did write two programs a while back. I'm rather proud of them anyway.
FACTORS program
This program will find all of the positive factors of an integer ≥ 1 (whole number) and then list the factors in a matrix.
PROGRAM:FACTORS
:DelVar [A]
:Input "FACTORS OF: ",X
:1→Z:1→Y
:While Z≤X/Z
:If X/Z=int(X/Z:Then
:{Y,2→dim([A]
:Z→[A](Y,1
:X/Z→[A](Y,2
:Y+1→Y
:End
:Z+1→Z
:End
:[A]
RADICALS program
This program will simplify a radical. It accepts an input that is an integer other than 0 or 1. (√0 = 0 and √1 = ±1).
PROGRAM:RADICALS
:DelVar L₂
:ClrHome
:Output(1,16,")
:Input "√(",X
:X→S:abs(X→X
:1→Z:1→Y
:While Z≤X/Z
:If X/Z=int(X/Z:Then
:Z→L₂(Y
:Y+1→Y
:X/Z→L₂(Y
:Y+1→Y
:End
:Z+1→Z
:End
:SortD(L₂
:1→Z:X→D
:While √(D)≠int(√(D
:L₂(Z→D
:Z+1→Z
:End
:Disp "
:If D≠1
:Output(2,1,√(D
:If S≠X
:Output(2,7,i
:If X/D≠1:Then
:Output(2,8,"√(
:Output(2,9,X/D
:End