tính S=1/2^0+2/2^1+3/2^2+.....+n+1/2^n
Hãy nhập câu hỏi của bạn vào đây, nếu là tài khoản VIP, bạn sẽ được ưu tiên trả lời.
S = (30/2 + 1/2) + (31/2 + 1/2) + (32/2 + 1/2) + (33/2 + 1/2) +..+ 3n-1/2 + 1/2
S = n.(1/2) + (1/2)[3^0 + 3^1 + 32 +...+ 3n-1]
S = n/2 + (3^n - 1)/4 = (3^n + 2n - 1)/4
S = (30/2 + 1/2) + (31/2 + 1/2) + (3²/2 + 1/2) + (3³/2 + 1/2) +..+ 3(n-1)/2 + 1/2
S = n.(1/2) + (1/2)[30 + 31 + 3² +...+ 3(n-1)]
S = n/2 + (3n - 1)/4 = (3n + 2n - 1)/4
#include <bits/stdc++.h>
using namespace std;
long long s,i,n;
int main()
{
cin>>n;
s=0;
for (i=1; i<=n; i++)
if (i%2==1) s=s+i*i;
cout<<s;
return 0;
}
1:
\(S=-\left(1-\dfrac{1}{10}+\dfrac{1}{10^2}-...-\dfrac{1}{10^{n-1}}\right)\)
\(=-\left[\left(-\dfrac{1}{10}\right)^0+\left(-\dfrac{1}{10}\right)^1+...+\left(-\dfrac{1}{10}\right)^{n-1}\right]\)
\(u_1=\left(-\dfrac{1}{10}\right)^0;q=-\dfrac{1}{10}\)
\(\left(-\dfrac{1}{10}\right)^0+\left(-\dfrac{1}{10}\right)^1+...+\left(-\dfrac{1}{10}\right)^{n-1}\)
\(=\dfrac{\left(-\dfrac{1}{10}\right)^0\left(1-\left(-\dfrac{1}{10}\right)^{n-1}\right)}{-\dfrac{1}{10}-1}\)
\(=\dfrac{1-\left(-\dfrac{1}{10}\right)^{n-1}}{-\dfrac{11}{10}}\)
=>\(S=\dfrac{1-\left(-\dfrac{1}{10}\right)^{n-1}}{\dfrac{11}{10}}\)
2:
\(S=\left(\dfrac{1}{3}\right)^0+\left(\dfrac{1}{3}\right)^1+...+\left(\dfrac{1}{3}\right)^{n-1}\)
\(u_1=1;q=\dfrac{1}{3}\)
\(S_{n-1}=\dfrac{1\cdot\left(1-\left(\dfrac{1}{3}\right)^{n-1}\right)}{1-\dfrac{1}{3}}\)
\(=\dfrac{3}{2}\left(1-\left(\dfrac{1}{3}\right)^{n-1}\right)\)
\(1,\) Ta có \(\left\{{}\begin{matrix}q=\dfrac{u_2}{u_1}=\dfrac{1}{10}:\left(-1\right)=-\dfrac{1}{10}\\u_1=-1\end{matrix}\right.\)
Vậy \(S=-1+\dfrac{1}{10}-\dfrac{1}{10^2}+...+\dfrac{\left(-1\right)^n}{10^{n-1}}=\dfrac{-1}{1-\left(-\dfrac{1}{10}\right)}=-\dfrac{10}{11}\)
\(2,\) Ta có \(\left\{{}\begin{matrix}q=\dfrac{u_2}{u_1}=\dfrac{1}{3}\\u_1=1\end{matrix}\right.\)
Vậy \(S=1+\dfrac{1}{3}+\dfrac{1}{3^2}+...+\dfrac{1}{3^{n-1}}=\dfrac{1}{1-\dfrac{1}{3}}=\dfrac{3}{2}\)
A = \(\frac{1}{3}+\frac{1}{3^2}+...+\frac{1}{3^{2007}}+\frac{1}{3^{2008}}\)
3A= \(1+\frac{1}{3}+...+\frac{1}{3^{2006}}+\frac{1}{3^{2007}}\)
3A-A= \(1-\frac{1}{3^{2008}}\)
ghi cách làm ra giùm cái