05-16-2003, 03:55 AM
Binomial theorem:
The (k+1)st term of (a + b) ^ n is:
A library would be interesting. Oh, and here's sums of geometric, arithmetic, and infinite geometric sequences:
G: t1 * (1 - r ^ n) / (1 - r) r != 1
A: n * (t1 + tn) / 2
I: t1 / (1 - r)
where r is the common ratio, t1 is the first term in the sequence, n is the number of terms to sum, and tn is the nth term of the sequence.
The (k+1)st term of (a + b) ^ n is:
Code:
factorial(n) / factorial(n - k) / factorial(k) * a ^ (n - k) * b ^ k
A library would be interesting. Oh, and here's sums of geometric, arithmetic, and infinite geometric sequences:
G: t1 * (1 - r ^ n) / (1 - r) r != 1
A: n * (t1 + tn) / 2
I: t1 / (1 - r)
where r is the common ratio, t1 is the first term in the sequence, n is the number of terms to sum, and tn is the nth term of the sequence.