suite.py

Created by thomas-66

Created on May 22, 2023

826 Bytes


# Type your text here






#calcul premier terme d'une suite:
#forme explicite
exemple :
Pour tout n apartenant au naturel N
Un=3n**2-1
U0=3*0**2-1   =-1
U1=3*1**2-1   =2
U2=3*2**2-1   =11
U3=3*3**2-1   =26


#récurrence, 
Vn+1=2Vn-1
V0=2
V1=2*V0-1=2*2-1=3
V2=2*V1-1=2*3-1=5
V3=2*V2-1=2*5-1=9


V11=2*V10-1
V10=2*V9-1
---------------
U0=2
n=0  U1=2+2*0=2
n=1  U2=2+2*1=4
n=2  U3=4+2*2=8

#représentation graphique,
n   |Un
0  |-3
-------
1  |-2,5
-------
2  |-1
-------
3  |1,5
-------
4  |5
-------
5  |9,5   
-------
6  |15
-------
7  |21,5


Un
  |
  |
25|
20|
15|
10|
5 |
0-------------------n
1 2 3 4 5 6 7 

Ne pas relier les points

#algorithme terme et liste
def terme(n):
    n=2 #premier valeur de la suite
    for i in range(1,n+1):
        u=0.2*u+1  # formule de recurence
    return(u)#affichage

During your visit to our site, NumWorks needs to install "cookies" or use other technologies to collect data about you in order to:

With the exception of Cookies essential to the operation of the site, NumWorks leaves you the choice: you can accept Cookies for audience measurement by clicking on the "Accept and continue" button, or refuse these Cookies by clicking on the "Continue without accepting" button or by continuing your browsing. You can update your choice at any time by clicking on the link "Manage my cookies" at the bottom of the page. For more information, please consult our cookies policy.