Difference between revisions of "PrimeFactors Command"
From GeoGebra Manual
Line 1: | Line 1: | ||
<noinclude>{{Manual Page|version=4.0}}</noinclude> | <noinclude>{{Manual Page|version=4.0}}</noinclude> | ||
{{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. |
− | *<code>PrimeFactors[1024]</code> | + | :{{example|1=<div> |
− | *<code>PrimeFactors[42]</code> | + | :* <code><nowiki>PrimeFactors[1024]</nowiki></code> yields ''{2, 2, 2, 2, 2, 2, 2, 2, 2, 2}''. |
− | {{ | + | :* <code><nowiki>PrimeFactors[42]</nowiki></code> yields ''{2, 3, 7}''.</div>}} |
+ | {{note|See also [[Factors Command]].}} | ||
==CAS Syntax== | ==CAS Syntax== | ||
− | ;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|1=<div> | ||
+ | :* <code><nowiki>PrimeFactors[1024]</nowiki></code> yields ''{2, 2, 2, 2, 2, 2, 2, 2, 2, 2}''. | ||
+ | :* <code><nowiki>PrimeFactors[42]</nowiki></code> yields ''{2, 3, 7}''.</div>}} | ||
+ | {{note|See also [[Factors Command]].}} |
Revision as of 11:55, 23 August 2011
- PrimeFactors[ <Number> ]
- Returns the list of primes whose product equals to the given number.
- Example:
PrimeFactors[1024]
yields {2, 2, 2, 2, 2, 2, 2, 2, 2, 2}.PrimeFactors[42]
yields {2, 3, 7}.
Note: See also Factors Command.
CAS Syntax
- PrimeFactors[ <Number> ]
- Returns the list of primes whose product equals to the given number.
- Example:
PrimeFactors[1024]
yields {2, 2, 2, 2, 2, 2, 2, 2, 2, 2}.PrimeFactors[42]
yields {2, 3, 7}.
Note: See also Factors Command.