CoCalc Public Files201-303-AH / Fichiers Sage pour les Étudiants / Exemple 4 p 19.sagews
Author: Julien Giol
Description: Fichiers Sage
Compute Environment: Ubuntu 18.04 (Deprecated)

# Exploration

var('n')

n
a(n) = 2^(2*n)*3^(1-n)

a(0)

3 4
S = tuple([a(0)])
S

(3,)
for i in range (1, 56):
S = S + tuple([a(i)])

show(S)

($\displaystyle 3$, $\displaystyle 4$, $\displaystyle \frac{16}{3}$, $\displaystyle \frac{64}{9}$, $\displaystyle \frac{256}{27}$, $\displaystyle \frac{1024}{81}$, $\displaystyle \frac{4096}{243}$, $\displaystyle \frac{16384}{729}$, $\displaystyle \frac{65536}{2187}$, $\displaystyle \frac{262144}{6561}$, $\displaystyle \frac{1048576}{19683}$, $\displaystyle \frac{4194304}{59049}$, $\displaystyle \frac{16777216}{177147}$, $\displaystyle \frac{67108864}{531441}$, $\displaystyle \frac{268435456}{1594323}$, $\displaystyle \frac{1073741824}{4782969}$, $\displaystyle \frac{4294967296}{14348907}$, $\displaystyle \frac{17179869184}{43046721}$, $\displaystyle \frac{68719476736}{129140163}$, $\displaystyle \frac{274877906944}{387420489}$, $\displaystyle \frac{1099511627776}{1162261467}$, $\displaystyle \frac{4398046511104}{3486784401}$, $\displaystyle \frac{17592186044416}{10460353203}$, $\displaystyle \frac{70368744177664}{31381059609}$, $\displaystyle \frac{281474976710656}{94143178827}$, $\displaystyle \frac{1125899906842624}{282429536481}$, $\displaystyle \frac{4503599627370496}{847288609443}$, $\displaystyle \frac{18014398509481984}{2541865828329}$, $\displaystyle \frac{72057594037927936}{7625597484987}$, $\displaystyle \frac{288230376151711744}{22876792454961}$, $\displaystyle \frac{1152921504606846976}{68630377364883}$, $\displaystyle \frac{4611686018427387904}{205891132094649}$, $\displaystyle \frac{18446744073709551616}{617673396283947}$, $\displaystyle \frac{73786976294838206464}{1853020188851841}$, $\displaystyle \frac{295147905179352825856}{5559060566555523}$, $\displaystyle \frac{1180591620717411303424}{16677181699666569}$, $\displaystyle \frac{4722366482869645213696}{50031545098999707}$, $\displaystyle \frac{18889465931478580854784}{150094635296999121}$, $\displaystyle \frac{75557863725914323419136}{450283905890997363}$, $\displaystyle \frac{302231454903657293676544}{1350851717672992089}$, $\displaystyle \frac{1208925819614629174706176}{4052555153018976267}$, $\displaystyle \frac{4835703278458516698824704}{12157665459056928801}$, $\displaystyle \frac{19342813113834066795298816}{36472996377170786403}$, $\displaystyle \frac{77371252455336267181195264}{109418989131512359209}$, $\displaystyle \frac{309485009821345068724781056}{328256967394537077627}$, $\displaystyle \frac{1237940039285380274899124224}{984770902183611232881}$, $\displaystyle \frac{4951760157141521099596496896}{2954312706550833698643}$, $\displaystyle \frac{19807040628566084398385987584}{8862938119652501095929}$, $\displaystyle \frac{79228162514264337593543950336}{26588814358957503287787}$, $\displaystyle \frac{316912650057057350374175801344}{79766443076872509863361}$, $\displaystyle \frac{1267650600228229401496703205376}{239299329230617529590083}$, $\displaystyle \frac{5070602400912917605986812821504}{717897987691852588770249}$, $\displaystyle \frac{20282409603651670423947251286016}{2153693963075557766310747}$, $\displaystyle \frac{81129638414606681695789005144064}{6461081889226673298932241}$, $\displaystyle \frac{324518553658426726783156020576256}{19383245667680019896796723}$, $\displaystyle \frac{1298074214633706907132624082305024}{58149737003040059690390169}$)
show(S[25].n())

$\displaystyle 3986.48073735860$
show(S[55].n())

$\displaystyle 2.23229593379905 \times 10^{7}$

# Procédure pour calculer les sommes partielles

def sommes_partielles(a, N):
S = tuple([a(0)])
G = points([0, a(0)],  color='darkgreen', pointsize=50)
for i in range(1, N+1):
S_partielle = S[i-1]+a(i)
S = S + tuple([S_partielle])
G = G + points([i, S_partielle],  color='darkgreen', pointsize=50)
return S, G

S = sommes_partielles(a, 100)[0]
G = sommes_partielles(a, 100)[1]

S[100].n()

3.74157889224863e13
G


# Conclusion

On voit que la suite des sommes partielles $\displaystyle\left\{S_n=\sum_{k=0}^n a_k\right\}$ est croissante et non majorée, donc : $\lim_{n\rightarrow +\infty}S_n=+\infty$ et la série $\displaystyle\sum_{k=0}^{+\infty} a_k$ diverge.