Difference between revisions of "PrimeFactors Command"
From GeoGebra Manual
Line 2: | Line 2: | ||
{{command|algebra}} | {{command|algebra}} | ||
;PrimeFactors[ <Number> ]:Returns the list of [[w:Prime number|primes]] whose product equals to the given number. | ;PrimeFactors[ <Number> ]:Returns the list of [[w:Prime number|primes]] whose product equals to the given number. | ||
− | {{Example| | + | {{Example|1=<br/> |
*<code>PrimeFactors[1024]</code> returns ''{2,2,2,2,2,2,2,2,2,2}''. | *<code>PrimeFactors[1024]</code> returns ''{2,2,2,2,2,2,2,2,2,2}''. | ||
*<code>PrimeFactors[42]</code> returns ''{2,3,7}''.}} | *<code>PrimeFactors[42]</code> returns ''{2,3,7}''.}} | ||
{{Note|See also [[Factors Command]].}} | {{Note|See also [[Factors Command]].}} |
Revision as of 15:54, 18 April 2011
- PrimeFactors[ <Number> ]
- Returns the list of primes whose product equals to the given number.
Example:
PrimeFactors[1024]
returns {2,2,2,2,2,2,2,2,2,2}.PrimeFactors[42]
returns {2,3,7}.
Note: See also Factors Command.