Properties
Similar Topics
Statistics
Comments
2
Participants
2
Subscribers
2
Votes
1
Views
223
Share
Generating all factors
Answered
Hi everyone,
PrimeFactors(n) gives a list with the prime factors of n.
How might I use that to generate all the factors of n?
I.e., PrimeFactors(12)={2,2,3}
I would like to generate the list {1,2,3,4,6,12}.
I can imagine generating all multiplication iterations of {a1, a2, a3, ..., an}, pulling out the unique results, and appending 1. Is there an easier or more elegant way?
Any ideas?
 GeoGebra
 Help
 Partners

Contact us
 Feedback & Questions
 This email address is being protected from spambots. You need JavaScript enabled to view it.
 +43 677 6137 2693
© 2020 International GeoGebra Institute
divisorslist(number)
LOL. Yep, that would be both easier and more elegant... Thanks!
Comments have been locked on this page!