Difference between revisions of "PrimeFactors Command"

From GeoGebra Manual
Jump to: navigation, search
(command syntax: changed [ ] into ( ))
 
(10 intermediate revisions by 7 users not shown)
Line 1: Line 1:
<noinclude>{{Manual Page|version=4.0}}</noinclude>
+
<noinclude>{{Manual Page|version=5.0}}</noinclude>{{command|cas=true|algebra}}
{{command|algebra}}
+
;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 is equal to the given number.  
{{Example|1=<br/>
+
:{{examples|1=<div>
*<code>PrimeFactors[1024]</code> returns ''{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>PrimeFactors[42]</code> returns ''{2,3,7}''.}}
+
:* <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 is equal to the given number.
 +
:{{examples|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|Factor]] command.}}

Latest revision as of 12:02, 5 October 2017


PrimeFactors( <Number> )
Returns the list of primes whose product is equal 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 is equal 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 Factor command.
© 2024 International GeoGebra Institute