Difference between revisions of "PrimeFactors Command"

From GeoGebra Manual
Jump to: navigation, search
m (typo)
Line 3: Line 3:
 
;PrimeFactors[ <Number> ]
 
;PrimeFactors[ <Number> ]
 
:Returns the list of [[w:Prime number|primes]] whose product equals to the given number.  
 
:Returns the list of [[w:Prime number|primes]] whose product equals to the given number.  
:{{example|1=<div>
+
:{{examples|1=<div>
 
:* <code><nowiki>PrimeFactors[1024]</nowiki></code> yields ''{2, 2, 2, 2, 2, 2, 2, 2, 2, 2}''.
 
:* <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>}}
 
:* <code><nowiki>PrimeFactors[42]</nowiki></code> yields ''{2, 3, 7}''.</div>}}
Line 10: Line 10:
 
;PrimeFactors[ <Number> ]
 
;PrimeFactors[ <Number> ]
 
:Returns the list of [[w:Prime number|primes]] whose product equals to the given number.
 
:Returns the list of [[w:Prime number|primes]] whose product equals to the given number.
:{{example|1=<div>
+
:{{examples|1=<div>
 
:* <code><nowiki>PrimeFactors[1024]</nowiki></code> yields ''{2, 2, 2, 2, 2, 2, 2, 2, 2, 2}''.
 
:* <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>}}
 
:* <code><nowiki>PrimeFactors[42]</nowiki></code> yields ''{2, 3, 7}''.</div>}}
 
{{note|See also [[Factors Command]].}}
 
{{note|See also [[Factors Command]].}}

Revision as of 09:03, 24 June 2013



PrimeFactors[ <Number> ]
Returns the list of primes whose product equals to the given number.
Examples:
  • PrimeFactors[1024] yields {2, 2, 2, 2, 2, 2, 2, 2, 2, 2}.
  • PrimeFactors[42] yields {2, 3, 7}.


CAS Syntax

PrimeFactors[ <Number> ]
Returns the list of primes whose product equals to the given number.
Examples:
  • PrimeFactors[1024] yields {2, 2, 2, 2, 2, 2, 2, 2, 2, 2}.
  • PrimeFactors[42] yields {2, 3, 7}.
Note: See also Factors Command.
© 2024 International GeoGebra Institute