(wx)Maxima: list factors of an integer

276 views Asked by At

How can one return the factors of an integer in a list? e.g. list_factors(6); > [1,2,3,6]? Is something like this possible? I looked through the documentation but didn't find anything like this tied to "factor" or "prime".

1

There are 1 answers

0
Eric Blom On BEST ANSWER

I think this is what you want:

listify(divisors(6)); > [1, 2, 3, 6]