Difference between revisions of "BinomialCoefficient Command"
From GeoGebra Manual
m (changed CAS syntax description) |
m (Text replace - ";(.*)\[(.*)\]" to ";$1($2)") |
||
Line 1: | Line 1: | ||
<noinclude>{{Manual Page|version=5.0}}</noinclude>{{command|cas=true|algebra}} | <noinclude>{{Manual Page|version=5.0}}</noinclude>{{command|cas=true|algebra}} | ||
− | ;BinomialCoefficient | + | ;BinomialCoefficient( <Number>, <Number> ) |
:Calculates the binomial coefficient <math> n \choose r </math>. The first Number represents all elements ''n'' and the second Number represents the selected elements ''r''. | :Calculates the binomial coefficient <math> n \choose r </math>. The first Number represents all elements ''n'' and the second Number represents the selected elements ''r''. | ||
:{{example|1=<div><code><nowiki>BinomialCoefficient[5, 3]</nowiki></code> yields ''10''.</div>}} | :{{example|1=<div><code><nowiki>BinomialCoefficient[5, 3]</nowiki></code> yields ''10''.</div>}} |
Revision as of 17:15, 7 October 2017
- BinomialCoefficient( <Number>, <Number> )
- Calculates the binomial coefficient n \choose r . The first Number represents all elements n and the second Number represents the selected elements r.
- Example:
BinomialCoefficient[5, 3]
yields 10.
- Hint: If your input in the CAS View contains undefined variables, then this command yields a formula for the binomial coefficient.
- Example:
BinomialCoefficient[n, 3]
yields \frac{n^{3} - 3 n^{2} + 2 n}{6}.
Note: See also NPr command.