Catalan (n)
Renvoie le n
-ième nombre catalan.
See Planetmath for more information.
Combinations (k,n)
Renvoie toutes les combinaisons de k nombres de 1 à n comme un vecteur de vecteurs (consultez aussi NextCombination).
See Wikipedia for more information.
DoubleFactorial (n)
Double factorielle : n(n-2)(n-4)...
See Planetmath for more information.
Factorial (n)
Factorielle : n(n-1)(n-2)...
See Planetmath for more information.
FallingFactorial (n,k)
Factorielle décroissante : (n)_k·=·n(n-1)...(n-(k-1))
See Planetmath for more information.
Fibonacci (x)
Alias : fib
Calcule le n
-ième nombre de Fibonacci. C'est-à-dire le nombre défini de manière récursive par Fibonacci(n) = Fibonacci(n-1) + Fibonacci(n-2)
et Fibonacci(1) = Fibonacci(2) = 1
.
See Wikipedia or Planetmath or Mathworld for more information.
FrobeniusNumber (v,param...)
Calculate the Frobenius number. That is calculate largest number that cannot be given as a non-negative integer linear combination of a given vector of non-negative integers. The vector can be given as separate numbers or a single vector. All the numbers given should have GCD of 1.
GaloisMatrix (règle_de_combinaison)
Galois matrix given a linear combining rule (a_1*x_1+...+a_n*x_n=x_(n+1)).
GreedyAlgorithm (n,v)
Trouve le vecteur c
d'entiers non négatifs tel que le produit scalaire par v
est égal à n. Si ce n'est pas possible, renvoie null
. v
doit être fourni trié dans l'ordre croissant et doit être composé d'entier non négatif.
HarmonicNumber (n,r)
Alias : HarmonicH
Harmonic Number, the n
th harmonic number of order r
.
That is, it is the sum of 1/k^r
for k
from 1 to n. Equivalent to sum k = 1 to n do 1/k^r
.
See Wikipedia for more information.
Hofstadter (n)
Fonction de Hofstadter q(n) définie par q(1)=1, q(2)=1, q(n)=q(n-q(n-1))+q(n-q(n-2)).
See Wikipedia for more information. The sequence is A005185 in OEIS.
LinearRecursiveSequence (valeurs_ensemencement,règle_de_combinaison,n)
Calcule la relation de récurrence linéaire en utilisant l'algorithme de Galois.
Multinomial (v,param...)
Calcule les coefficients multinomiaux. Prend un vecteur de k
entiers non négatifs et calcule les coefficients multinomiaux. Cela correspond aux coefficients dans le polynôme homogène à k
variables avec les puissances correspondantes.
The formula for Multinomial(a,b,c)
can be written as:
(a+b+c)! / (a!b!c!)
In other words, if we would have only two elements, then
Multinomial(a,b)
is the same thing as
Binomial(a+b,a)
or
Binomial(a+b,b)
.
See Wikipedia, Planetmath, or Mathworld for more information.
NextCombination (v,n)
Calcule la combinaison qui apparaîtrait après v dans un appel à la fonction combinations, la première combinaison devrait être [1:k]
. Cette fonction est utile si vous devez parcourir beaucoup de combinaisons et que vous ne voulez pas gaspiller de la mémoire pour les enregistrer.
For example with Combinations you would normally write a loop like:
for n in Combinations (4,6) do (
SomeFunction (n)
);
But with NextCombination you would write something like:
n:=[1:4];
do (
SomeFunction (n)
) while not IsNull(n:=NextCombination(n,6));
See also Combinations.
See Wikipedia for more information.
Pascal (i)
Get the Pascal's triangle as a matrix. This will return
an i
+1 by i
+1 lower diagonal
matrix that is the Pascal's triangle after i
iterations.
See Planetmath for more information.
Permutations (k,n)
Renvoie toutes les permutations de k
nombres de 1 à n
comme un vecteur de vecteurs.
RisingFactorial (n,k)
Alias : Pochhammer
Factorielle croissante (Pochhammer) : (n)_k = n(n+1)...(n+(k-1)).
See Planetmath for more information.
StirlingNumberFirst (n,m)
Alias : StirlingS1
Nombre de Stirling du premier type.
See Planetmath or Mathworld for more information.
StirlingNumberSecond (n,m)
Alias : StirlingS2
Nombre de Stirling du second type.
See Planetmath or Mathworld for more information.
Subfactorial (n)
Subfactorial: n! times sum_{k=0}^n (-1)^k/k!.
Triangular (nième)
Calcule le n
-ième nombre triangulaire.
See Planetmath for more information.
nCr (n,r)
Alias : Binomial
Calcule le nombre de combinaisons, c'est-à-dire le coefficient binomial. n
peut être n'importe quel nombre réel.
See Planetmath for more information.
nPr (n,r)
Calculate the number of permutations of size
r
of numbers from 1 to n
.