EX 9

     

Given the value of n, we need to find the sum of the series where i-th term is sum of first i natural numbers.Examples :

Input : n = 5 Output : 35Explanation :(1) + (1+2) + (1+2+3) + (1+2+3+4) + (1+2+3+4+5) = 35Input : n = 10Output : 220Explanation :(1) + (1+2) + (1+2+3) + .... +(1+2+3+4+.....+10) = 220




Bạn đang xem: Ex 9

220Efficient Approach :Letn^{th} term of the series 1 + (1 + 2) + (1 + 2 + 3) + (1 + 2 + 3 + 4)…(1 + 2 + 3 +..n) be denoted as an

an = Σn1 i = \frac{n (n + 1)}{2} = \frac{(n^2 + n)}{2}Sum of n-terms of series Σn1 an = Σn1 \frac{(n^2 + n)}{2}= \frac{1}{2} Σ < n^2 title="Rendered by QuickLaTeX.com" height=27 width=5 style=vertical-align:-7px> + Σ < n title="Rendered by QuickLaTeX.com" height=27 width=5 style=vertical-align:-7px>= \frac{1}{2} * \frac{n(n + 1)(2n + 1)}{6} + \frac{1}{2} * \frac{n(n+1)}{2}= \frac{n(n+1)(2n+4)}{12}Below is implementation of above approach :


5.Minimize value of a in series a, a/b^1, a/b^2, a/b^3, ..., a/b^n such that sum of initial non-zero terms becomes at least S


Xem thêm: Tìm Hệ Thức Giữa X1 X2 Độc Lập Với M, Tìm Hệ Thức Độc Lập Đối Với M Giữa X1, X2 Biết X

https://media.giaimaivang.vn/auth/avatar.png


Xem thêm: Một Trong Những Ý Nghĩa Của Việc Phát Minh Ra Máy Hơi Nước Là Gì?

We use cookies to ensure you have the best browsing experience on our website. By using our site, youacknowledge that you have read and understood ourCookie Policy & Privacy PolicyGot It !