énoncés
By Pr. El Hadiq Zouhair
Produce the first 10 terms of each:
Given L = [3, 1, 4, 1, 5, 9, 2, 6], compute its sum and its product.
For $c = 2,\, d = 3,\, n = 10$, list $\{c + kd\}_{k=0}^{n}$ and compute its sum. Then verify the closed-form $\dfrac{(n+1)(2c + nd)}{2}$.
For $d = 2,\, r = 3,\, n = 8$, list $\{d \cdot r^k\}_{k=0}^{n}$ and compute its sum. Verify the closed-form $\dfrac{d\,(r^{\,n+1} - 1)}{r - 1}$.
For $n = 100$, compute:
Verify for $n = 1..1000$. Then prove it symbolically with SymPy.
Compute $\displaystyle \sum_{k=0}^{\infty} \left(\tfrac{3}{10}\right)^{k}$ and $\displaystyle \sum_{k=1}^{\infty} \left(\tfrac{1}{2}\right)^{k}$ both numerically and with SymPy.
The Fibonacci sequence is $F_0 = 0,\ F_1 = 1,\ F_n = F_{n-1} + F_{n-2}$. Print $F_0..F_{15}$ using:
rsolve to obtain the closed-form (Binet's formula).Compute $\displaystyle\sum_{k=1}^{\infty} \frac{1}{k^p}$ for $p = 1, 2, 3$. Which converge? Compare partial sums to known exact values (Basel problem: $\pi^2/6$ for $p=2$).
Compute $C_0..C_{10}$ from $C_n = \frac{1}{n+1}\binom{2n}{n}$ in two ways:
math.comb.sympy.catalan.Express $n! = \displaystyle\prod_{k=1}^{n} k$ in three ways: math.prod, functools.reduce, and SymPy's Product. Compute $10!$.
rsolve hardSolve each recurrence symbolically.
sympy.summation on $\sum_{k=0}^{\infty} x^k/k!$ — recognize the result.generating_function ideas to derive a closed form for $\sum_{k=0}^{\infty} k\,r^k$.Open the main lesson for the matching theory.