` ``Input A For(B,1,A If B>√(A Stop A/B If Ans=int(Ans Disp {B,Ans End`

This program is relatively small, it's 35 bytes not including the name.

This code will display factors as a list depending on the input. So, if the input were 30, you would get:

` ``?30 //Input {1 30 {2 15 {3 10 {5 6 Done`

Edit: nevermind that was really easy to understand once I broke it down…. why didn't I ever think of that? again, thanks!

]]>` ``:Input A :{1,A→L₁ :For(B,2,√(A :A/B :If not(fPart(Ans:Then :Ans→L₁(1+dim(L₁ :If Ans≠B: :B→L₁(1+dim(L₁ :End:End`

You could even add a bit of speed by only checking odd divisors if the input is odd:

` ``:Input A :{1,A→L₁ :For(B,2+remainder(A,2),√(A),1+remainder(A,2 :A/B :If not(fPart(Ans:Then :Ans→L₁(1+dim(L₁ :If Ans≠B: :B→L₁(1+dim(L₁ :End:End`

These do require the list to be sorted afterward, though (either with SortA( for ascending or SortD( for descending).

]]>Overall though the algorithm is tiny (though obviously not very efficient) so good job in that regard. I can't see any obvious major optimizations. ]]>

` ``:DelVar L₁1→C :Input A :For(B,1,A :A/B→L₁(C:C+not(fPart(Ans→C :End:L₁`