LES SUITES GÉOMÉTRIQUES
I - Étude d'une suite géométrique
Définition 1 :
On appelle suite géométrique une suite $(v_n)$ définie par son premier terme et la relation de récurrence :
$\forall n \in \mathbb{N},\, v_{n+1} = q v_n, \quad q \in \mathbb{R}$
Vocabulaire :
Le nombre $q$ est appelé raison de la suite géométrique.
Application: Suite géométrique définie par récurrence
On considère la suite $(v_n)$ définie par : $\begin{cases} v_0 = 2 \\ \forall n \in \mathbb{N},\, v_{n+1} = 3v_n \end{cases}$
$(v_n)$ est une suite géométrique de premier terme $v_0 = 2$ et de raison $q = 3$.
Propriété 1 :
$(v_n)$ est une suite géométrique de raison $q \neq 0$ et de premier terme $v_0$ si et seulement si :
$\forall n \in \mathbb{N},\, v_n = v_0 \times q^n$
Démonstration :
-
Si $(v_n)$ est une suite géométrique de raison $q$ et de premier terme $v_0$ alors :
$ \begin{aligned} v_1 &= q \times v_0 && \quad \text{ligne 1} \\ v_2 &= q \times v_1 && \quad \text{ligne 2} \\ \times \quad \dots &= \dots && \\ v_{n-1} &= q \times v_{n-2} && \quad \text{ligne } n-1 \\ v_n &= q \times v_{n-1} && \quad \text{ligne } n \\ \hline v_1 \times v_2 \times \dots \times v_{n-1} \times v_n &= q v_0 \times q v_1 \times \dots \times q v_{n-1} && \\ \cancel{v_1 \times v_2 \times \dots \times v_{n-1}} \times v_n &= q^n \times v_0 \times \cancel{v_1 \times \dots \times v_{n-1}} && \quad (\text{On suppose } v_0 \neq 0) \end{aligned} $D'où $v_n = v_0 \times q^n$.
- Si $\forall n \in \mathbb{N},\, v_n = v_0 \times q^n$ alors $\forall n \in \mathbb{N},\, v_{n+1} = v_0 \times q^{n+1} = v_0 \times q^n \times q = v_n \times q$ et $v_0 = v_0 \times q^0 = v_0 \times 1 = v_0$.
Donc $(v_n)$ est une suite géométrique de raison $q$ et de premier terme $v_0$.
Conséquence :
Toute suite géométrique $(v_n)$ caractérise une évolution exponentielle.
Application: Représentation graphique d'une suite géométrique ($q > 0$)
Soit $(v_n)$ telle que $v_0 = 1$ et $q = 2$.
$\forall n \in \mathbb{N},\, v_n = v_0 \times q^n = 1 \times 2^n = 2^n$
| $n$ | 0 | 1 | 2 | 3 | 4 | 5 |
|---|---|---|---|---|---|---|
| $v_n$ | 1 | 2 | 4 | 8 | 16 | 32 |
Soit $(w_n)$ telle que $w_0 = 24$ et $q = 0,5$.
$\forall n \in \mathbb{N},\, w_n = w_0 \times q^n = 24 \times 0,5^n$
| $n$ | 0 | 1 | 2 | 3 | 4 | 5 |
|---|---|---|---|---|---|---|
| $w_n$ | 24 | 12 | 6 | 3 | 1,5 | 0,75 |
Méthode: Déterminer si une suite est géométrique
-
1er cas : l'expression de la suite étudiée est de la forme $v_{n+1} = q v_n$.
Exemple : $v_{n+1} = 5 v_n$.
Dans ce cas, on dit que l'expression algébrique de la suite vérifie la définition d'une suite géométrique avec $q = 5$. Donc $(v_n)$ est une suite géométrique de raison $q = 5$. -
2e cas : la suite est de la forme $v_n = a \times b^n$.
Exemple : $v_n = 4 \times 3^n$.
Dans ce cas, on dit que l'expression algébrique de $v_n$ vérifie $v_n = v_0 \times q^n$ avec $q = 3$ et $v_0 = 4$.
Donc c'est une suite géométrique de raison $q = 3$. -
3e cas : la suite ne vérifie ni la définition, ni la propriété.
Dans ce cas, on fera l'étude complète :- On calcule les premiers termes de la suite (ici, on les appelle $v_0$, $v_1$ et $v_2$). On suppose qu'ils sont différents de zéro.
- On calcule $\dfrac{v_1}{v_0}$ et $\dfrac{v_2}{v_1}$. Si $\dfrac{v_1}{v_0} \neq \dfrac{v_2}{v_1}$ alors la suite n'est pas géométrique ; sinon, on pose $q = \dfrac{v_1}{v_0}$ et on calcule, $\forall n \in \mathbb{N},\, v_{n+1} - qv_n$.
- Si, $\forall n \in \mathbb{N},\, v_{n+1} - qv_n = 0$, alors la suite est géométrique.
- $v_0 = 3 \times 2^0 = 3$ ; $v_1 = 3 \times 2^1 = 6$ ; $v_2 = 3 \times 2^2 = 12$.
- $\dfrac{v_1}{v_0} = \dfrac{6}{3} = 2$ et $\dfrac{v_2}{v_1} = \dfrac{12}{6} = 2$ donc $\dfrac{v_1}{v_0} = \dfrac{v_2}{v_1}$. On pose $q = 2$.
- $\forall n \in \mathbb{N},\, v_{n+1} - qv_n = 3 \times 2^{n+1} - 2 \times (3 \times 2^n) = 3 \times 2^{n+1} - 3 \times 2^{n+1} = 0$.
Propriété 2 :
Soit $(v_n)$ une suite géométrique de raison $q \neq 0$ :
$\forall n, p \in \mathbb{N},\, v_n = v_p \times q^{n-p}$
Démonstration :
On suppose que $v_0 \neq 0$ et $v_p \neq 0$ ;
$\forall n \in \mathbb{N},\, v_n = v_0 \times q^n \quad \text{et} \quad \forall p \in \mathbb{N},\, v_p = v_0 \times q^p \quad \text{donc} \quad \frac{v_n}{v_p} = \frac{v_0 \times q^n}{v_0 \times q^p} = q^{n-p} \quad \text{d'où} \quad v_n = v_p \times q^{n-p}$
II - Somme des termes d'une suite géométrique
Propriété 3 :
Soit $n$ un entier naturel non nul et $q$ un réel différent de 1, on a :
$1 + q + q^2 + \dots + q^n = \frac{1 - q^{n+1}}{1 - q}$
Démonstration :
On pose : $S_n = 1 + q + q^2 + \dots + q^n \quad \text{d'où } q \times S_n = q + q^2 + \dots + q^n + q^{n+1}$
D'où \quad $S_n = \dfrac{1 - q^{n+1}}{1 - q}$
Propriété 4 :
Soit $(v_n)$ une suite géométrique de premier terme $v_0$ et de raison $q \neq 0$ :
$\forall n \in \mathbb{N},\, v_0 + v_1 + v_2 + \dots + v_n = v_0 \frac{1 - q^{n+1}}{1 - q}$
Démonstration :
Remarque :
Si le premier terme de la suite est $v_1$, la somme précédente s'écrit :
$\forall n \in \mathbb{N}^*,\, v_1 + v_2 + \dots + v_n = v_1 \frac{1 - q^n}{1 - q}$
où $v_1$ est le premier terme de la somme et l'exposant $n$ est le nombre de termes de la somme.
Application: Calcul d'une somme avec Python
Calculer la somme des 20 premiers termes de la suite $(v_n)$ définie pour tout $n \in \mathbb{N}$ par $v_n = 3 \times 2^n$.
1. Programme Python avec une boucle for :
Sans utiliser la formule explicite de la somme, on peut la calculer avec l'algorithme suivant :
S = 0
for n in range(0, 20, 1):
v = 3 * 2**n
S = S + v
print("Somme :", S)
Ce programme parcourt les valeurs de $n$ de 0 à 19 (soit 20 termes). Il calcule chaque terme $v_n$ et l'ajoute à la somme $S$. Il affiche à la fin le résultat : 3145725.
2. Vérification avec la formule :
La suite $(v_n)$ est une suite géométrique de premier terme $v_0 = 3$ et de raison $q = 2$.
La somme de ses 20 premiers termes est $S_{19} = v_0 + v_1 + \dots + v_{19}$.
On applique la formule du cours :
$\text{Somme} = \text{Premier terme} \times \frac{1 - \text{raison}^{\text{Nombre de termes}}}{1 - \text{raison}}$
$S_{19} = v_0 \times \frac{1 - q^{20}}{1 - q} = 3 \times \frac{1 - 2^{20}}{1 - 2} = 3 \times \frac{1 - 1048576}{-1} = 3 \times 1048575 = 3145725$
On retrouve bien le même résultat que le programme Python.
GEOMETRIC SEQUENCES
I - Study of a geometric sequence
Definition 1:
A geometric sequence is a sequence $(v_n)$ defined by its first term and the recurrence relation:
$\forall n \in \mathbb{N},\, v_{n+1} = q v_n, \quad q \in \mathbb{R}$
Vocabulary:
The number $q$ is called the common ratio of the geometric sequence.
Application: Geometric sequence defined by recurrence
Consider the sequence $(v_n)$ defined by: $\begin{cases} v_0 = 2 \\ \forall n \in \mathbb{N},\, v_{n+1} = 3v_n \end{cases}$
$(v_n)$ is a geometric sequence with first term $v_0 = 2$ and common ratio $q = 3$.
Property 1:
$(v_n)$ is a geometric sequence with common ratio $q \neq 0$ and first term $v_0$ if and only if:
$\forall n \in \mathbb{N},\, v_n = v_0 \times q^n$
Proof:
-
If $(v_n)$ is a geometric sequence with common ratio $q$ and first term $v_0$ then:
$ \begin{aligned} v_1 &= q \times v_0 && \quad \text{line 1} \\ v_2 &= q \times v_1 && \quad \text{line 2} \\ \times \quad \dots &= \dots && \\ v_{n-1} &= q \times v_{n-2} && \quad \text{line } n-1 \\ v_n &= q \times v_{n-1} && \quad \text{line } n \\ \hline v_1 \times v_2 \times \dots \times v_{n-1} \times v_n &= q v_0 \times q v_1 \times \dots \times q v_{n-1} && \\ \cancel{v_1 \times v_2 \times \dots \times v_{n-1}} \times v_n &= q^n \times v_0 \times \cancel{v_1 \times \dots \times v_{n-1}} && \quad (\text{We suppose } v_0 \neq 0) \end{aligned} $Hence $v_n = v_0 \times q^n$.
- If $\forall n \in \mathbb{N},\, v_n = v_0 \times q^n$ then $\forall n \in \mathbb{N},\, v_{n+1} = v_0 \times q^{n+1} = v_0 \times q^n \times q = v_n \times q$ et $v_0 = v_0 \times q^0 = v_0 \times 1 = v_0$.
Therefore $(v_n)$ is a geometric sequence with common ratio $q$ and first term $v_0$.
Consequence:
Any geometric sequence $(v_n)$ characterizes an exponential evolution.
Application: Graphical representation of a geometric sequence ($q > 0$)
Let $(v_n)$ be such that $v_0 = 1$ et $q = 2$.
$\forall n \in \mathbb{N},\, v_n = v_0 \times q^n = 1 \times 2^n = 2^n$
| $n$ | 0 | 1 | 2 | 3 | 4 | 5 |
|---|---|---|---|---|---|---|
| $v_n$ | 1 | 2 | 4 | 8 | 16 | 32 |
Let $(w_n)$ be such that $w_0 = 24$ et $q = 0,5$.
$\forall n \in \mathbb{N},\, w_n = w_0 \times q^n = 24 \times 0,5^n$
| $n$ | 0 | 1 | 2 | 3 | 4 | 5 |
|---|---|---|---|---|---|---|
| $w_n$ | 24 | 12 | 6 | 3 | 1,5 | 0,75 |
Method: Determine if a sequence is geometric
-
1st case: the expression of the studied sequence is of the form $v_{n+1} = q v_n$.
Example: $v_{n+1} = 5 v_n$.
In this case, we say that the algebraic expression of the sequence verifies the definition of a geometric sequence with $q = 5$. Therefore $(v_n)$ is a geometric sequence with common ratio $q = 5$. -
2nd case: the sequence is of the form $v_n = a \times b^n$.
Example: $v_n = 4 \times 3^n$.
In this case, we say that the algebraic expression of $v_n$ verifies $v_n = v_0 \times q^n$ with $q = 3$ and $v_0 = 4$.
Therefore it is a geometric sequence with common ratio $q = 3$. -
3rd case: the sequence verifies neither the definition nor the property.
In this case, we will do the complete study:- On calcule les premiers termes de la suite (ici, on les appelle $v_0$, $v_1$ et $v_2$). We suppose qu'ils sont différents de zéro.
- We calculate $\dfrac{v_1}{v_0}$ and $\dfrac{v_2}{v_1}$. If $\dfrac{v_1}{v_0} \neq \dfrac{v_2}{v_1}$ then the sequence is not geometric; otherwise, we set $q = \dfrac{v_1}{v_0}$ and calculate, $\forall n \in \mathbb{N},\, v_{n+1} - qv_n$.
- If, $\forall n \in \mathbb{N},\, v_{n+1} - qv_n = 0$, then the sequence is geometric.
- $v_0 = 3 \times 2^0 = 3$ ; $v_1 = 3 \times 2^1 = 6$ ; $v_2 = 3 \times 2^2 = 12$.
- $\dfrac{v_1}{v_0} = \dfrac{6}{3} = 2$ et $\dfrac{v_2}{v_1} = \dfrac{12}{6} = 2$ so $\dfrac{v_1}{v_0} = \dfrac{v_2}{v_1}$. We set $q = 2$.
- $\forall n \in \mathbb{N},\, v_{n+1} - qv_n = 3 \times 2^{n+1} - 2 \times (3 \times 2^n) = 3 \times 2^{n+1} - 3 \times 2^{n+1} = 0$.
Property 2:
Let $(v_n)$ be a geometric sequence with common ratio $q \neq 0$:
$\forall n, p \in \mathbb{N},\, v_n = v_p \times q^{n-p}$
Proof:
We suppose que $v_0 \neq 0$ et $v_p \neq 0$ ;
$\forall n \in \mathbb{N},\, v_n = v_0 \times q^n \quad \text{et} \quad \forall p \in \mathbb{N},\, v_p = v_0 \times q^p \quad \text{so} \quad \frac{v_n}{v_p} = \frac{v_0 \times q^n}{v_0 \times q^p} = q^{n-p} \quad \text{hence} \quad v_n = v_p \times q^{n-p}$
II - Sum of the terms of a geometric sequence
Property 3:
Let $n$ be a non-zero natural integer and $q$ a real number different from 1, we have:
$1 + q + q^2 + \dots + q^n = \frac{1 - q^{n+1}}{1 - q}$
Proof:
Let: $S_n = 1 + q + q^2 + \dots + q^n \quad \text{hence } q \times S_n = q + q^2 + \dots + q^n + q^{n+1}$
D'où \quad $S_n = \dfrac{1 - q^{n+1}}{1 - q}$
Property 4:
Let $(v_n)$ be a geometric sequence with first term $v_0$ and common ratio $q \neq 0$:
$\forall n \in \mathbb{N},\, v_0 + v_1 + v_2 + \dots + v_n = v_0 \frac{1 - q^{n+1}}{1 - q}$
Proof:
Remark:
If the first term of the sequence is $v_1$, the previous sum is written:
$\forall n \in \mathbb{N}^*,\, v_1 + v_2 + \dots + v_n = v_1 \frac{1 - q^n}{1 - q}$
where $v_1$ is the first term in the sum and the exponent $n$ is the number of terms in the sum.
Application: Calculating a sum with Python
Calculate the sum of the first 20 terms of the sequence $(v_n)$ defined for all $n \in \mathbb{N}$ by $v_n = 3 \times 2^n$.
1. Python program with a for loop:
Without using the explicit formula of the sum, it can be calculated with the following algorithm:
S = 0
for n in range(0, 20, 1):
v = 3 * 2**n
S = S + v
print("Somme :", S)
This program goes through the values of $n$ from 0 to 19 (i.e., 20 terms). It calculates each term $v_n$ and adds it to the sum $S$. It finally displays the result: 3145725.
2. Verification with the formula:
The sequence $(v_n)$ is a geometric sequence with first term $v_0 = 3$ and common ratio $q = 2$.
The sum of its first 20 terms is $S_{19} = v_0 + v_1 + \dots + v_{19}$.
We apply the formula from the course:
$\text{Sum} = \text{First term} \times \frac{1 - \text{ratio}^{\text{Number of terms}}}{1 - \text{ratio}}$
$S_{19} = v_0 \times \frac{1 - q^{20}}{1 - q} = 3 \times \frac{1 - 2^{20}}{1 - 2} = 3 \times \frac{1 - 1048576}{-1} = 3 \times 1048575 = 3145725$
We indeed find the same result as the Python program.
LAS SUCESIONES GEOMÉTRICAS
I - Estudio de una sucesión geométrica
Definición 1:
Una sucesión geométrica es una sucesión $(v_n)$ definida por su primer término y la relación de recurrencia:
$\forall n \in \mathbb{N},\, v_{n+1} = q v_n, \quad q \in \mathbb{R}$
Vocabulario:
El número $q$ se llama la razón de la sucesión geométrica.
Aplicación: Sucesión geométrica definida por recurrencia
Consideremos la sucesión $(v_n)$ definida por: $\begin{cases} v_0 = 2 \\ \forall n \in \mathbb{N},\, v_{n+1} = 3v_n \end{cases}$
$(v_n)$ es una sucesión geométrica con primer término $v_0 = 2$ y razón $q = 3$.
Propiedad 1:
$(v_n)$ es una sucesión geométrica con razón $q \neq 0$ y primer término $v_0$ si y solo si:
$\forall n \in \mathbb{N},\, v_n = v_0 \times q^n$
Demostración:
-
Si $(v_n)$ es una sucesión geométrica con razón $q$ y primer término $v_0$ entonces:
$ \begin{aligned} v_1 &= q \times v_0 && \quad \text{línea 1} \\ v_2 &= q \times v_1 && \quad \text{línea 2} \\ \times \quad \dots &= \dots && \\ v_{n-1} &= q \times v_{n-2} && \quad \text{línea } n-1 \\ v_n &= q \times v_{n-1} && \quad \text{línea } n \\ \hline v_1 \times v_2 \times \dots \times v_{n-1} \times v_n &= q v_0 \times q v_1 \times \dots \times q v_{n-1} && \\ \cancel{v_1 \times v_2 \times \dots \times v_{n-1}} \times v_n &= q^n \times v_0 \times \cancel{v_1 \times \dots \times v_{n-1}} && \quad (\text{Suponemos } v_0 \neq 0) \end{aligned} $De ahí que $v_n = v_0 \times q^n$.
- Si $\forall n \in \mathbb{N},\, v_n = v_0 \times q^n$ entonces $\forall n \in \mathbb{N},\, v_{n+1} = v_0 \times q^{n+1} = v_0 \times q^n \times q = v_n \times q$ et $v_0 = v_0 \times q^0 = v_0 \times 1 = v_0$.
Por lo tanto, $(v_n)$ es una sucesión geométrica con razón $q$ y primer término $v_0$.
Consecuencia:
Cualquier sucesión geométrica $(v_n)$ caracteriza una evolución exponencial.
Aplicación: Representación gráfica de una sucesión geométrica ($q > 0$)
Sea $(v_n)$ tal que $v_0 = 1$ et $q = 2$.
$\forall n \in \mathbb{N},\, v_n = v_0 \times q^n = 1 \times 2^n = 2^n$
| $n$ | 0 | 1 | 2 | 3 | 4 | 5 |
|---|---|---|---|---|---|---|
| $v_n$ | 1 | 2 | 4 | 8 | 16 | 32 |
Sea $(w_n)$ tal que $w_0 = 24$ et $q = 0,5$.
$\forall n \in \mathbb{N},\, w_n = w_0 \times q^n = 24 \times 0,5^n$
| $n$ | 0 | 1 | 2 | 3 | 4 | 5 |
|---|---|---|---|---|---|---|
| $w_n$ | 24 | 12 | 6 | 3 | 1,5 | 0,75 |
Método: Determinar si una sucesión es geométrica
-
1er caso: la expresión de la sucesión estudiada es de la forma $v_{n+1} = q v_n$.
Ejemplo: $v_{n+1} = 5 v_n$.
En este caso, decimos que la expresión algebraica de la sucesión verifica la definición de una sucesión geométrica con $q = 5$. Por lo tanto, $(v_n)$ es una sucesión geométrica con razón $q = 5$. -
2do caso: la sucesión es de la forma $v_n = a \times b^n$.
Ejemplo: $v_n = 4 \times 3^n$.
En este caso, decimos que la expresión algebraica de $v_n$ verifica $v_n = v_0 \times q^n$ con $q = 3$ y $v_0 = 4$.
Por lo tanto, es una sucesión geométrica con razón $q = 3$. -
3er caso: la sucesión no verifica ni la definición ni la propiedad.
En este caso, haremos el estudio completo:- On calcule les premiers termes de la suite (ici, on les appelle $v_0$, $v_1$ et $v_2$). Suponemos qu'ils sont différents de zéro.
- Calculamos $\dfrac{v_1}{v_0}$ y $\dfrac{v_2}{v_1}$. Si $\dfrac{v_1}{v_0} \neq \dfrac{v_2}{v_1}$ entonces la sucesión no es geométrica; de lo contrario, establecemos $q = \dfrac{v_1}{v_0}$ y calculamos, $\forall n \in \mathbb{N},\, v_{n+1} - qv_n$.
- Si, $\forall n \in \mathbb{N},\, v_{n+1} - qv_n = 0$, entonces la sucesión es geométrica.
- $v_0 = 3 \times 2^0 = 3$ ; $v_1 = 3 \times 2^1 = 6$ ; $v_2 = 3 \times 2^2 = 12$.
- $\dfrac{v_1}{v_0} = \dfrac{6}{3} = 2$ et $\dfrac{v_2}{v_1} = \dfrac{12}{6} = 2$ así que $\dfrac{v_1}{v_0} = \dfrac{v_2}{v_1}$. Establecemos $q = 2$.
- $\forall n \in \mathbb{N},\, v_{n+1} - qv_n = 3 \times 2^{n+1} - 2 \times (3 \times 2^n) = 3 \times 2^{n+1} - 3 \times 2^{n+1} = 0$.
Propiedad 2:
Sea $(v_n)$ una sucesión geométrica con razón $q \neq 0$:
$\forall n, p \in \mathbb{N},\, v_n = v_p \times q^{n-p}$
Demostración:
Suponemos que $v_0 \neq 0$ et $v_p \neq 0$ ;
$\forall n \in \mathbb{N},\, v_n = v_0 \times q^n \quad \text{et} \quad \forall p \in \mathbb{N},\, v_p = v_0 \times q^p \quad \text{así que} \quad \frac{v_n}{v_p} = \frac{v_0 \times q^n}{v_0 \times q^p} = q^{n-p} \quad \text{de ahí que} \quad v_n = v_p \times q^{n-p}$
II - Suma de los términos de una sucesión geométrica
Propiedad 3:
Sea $n$ un entero natural no nulo y $q$ un número real diferente de 1, tenemos:
$1 + q + q^2 + \dots + q^n = \frac{1 - q^{n+1}}{1 - q}$
Demostración:
Sea: $S_n = 1 + q + q^2 + \dots + q^n \quad \text{de ahí que } q \times S_n = q + q^2 + \dots + q^n + q^{n+1}$
D'où \quad $S_n = \dfrac{1 - q^{n+1}}{1 - q}$
Propiedad 4:
Sea $(v_n)$ una sucesión geométrica con primer término $v_0$ y razón $q \neq 0$:
$\forall n \in \mathbb{N},\, v_0 + v_1 + v_2 + \dots + v_n = v_0 \frac{1 - q^{n+1}}{1 - q}$
Demostración:
Observación:
Si el primer término de la sucesión es $v_1$, la suma anterior se escribe:
$\forall n \in \mathbb{N}^*,\, v_1 + v_2 + \dots + v_n = v_1 \frac{1 - q^n}{1 - q}$
donde $v_1$ es el primer término de la suma y el exponente $n$ es el número de términos de la suma.
Aplicación: Cálculo de una suma con Python
Calcular la suma de los primeros 20 términos de la sucesión $(v_n)$ definida para todo $n \in \mathbb{N}$ por $v_n = 3 \times 2^n$.
1. Programa Python con un bucle for:
Sin utilizar la fórmula explícita de la suma, se puede calcular con el siguiente algoritmo:
S = 0
for n in range(0, 20, 1):
v = 3 * 2**n
S = S + v
print("Somme :", S)
Este programa recorre los valores de $n$ de 0 a 19 (es decir, 20 términos). Calcula cada término $v_n$ y lo añade a la suma $S$. Finalmente muestra el resultado: 3145725.
2. Verificación con la fórmula:
La sucesión $(v_n)$ es una sucesión geométrica con primer término $v_0 = 3$ y razón $q = 2$.
La suma de sus primeros 20 términos es $S_{19} = v_0 + v_1 + \dots + v_{19}$.
Aplicamos la fórmula del curso:
$\text{Suma} = \text{Primer término} \times \frac{1 - \text{razón}^{\text{Número de términos}}}{1 - \text{razón}}$
$S_{19} = v_0 \times \frac{1 - q^{20}}{1 - q} = 3 \times \frac{1 - 2^{20}}{1 - 2} = 3 \times \frac{1 - 1048576}{-1} = 3 \times 1048575 = 3145725$
Efectivamente encontramos el mismo resultado que el programa Python.