Computer Science, asked by meetthacker200410, 1 month ago

Draw a Flowchart to find and print the sum till the Nth item of the following sequence. 1, 4, 9, 16, 25, 36, 49...​

Answers

Answered by susobhanakhuli8537
0

Answer:

\frac{n * (n+1)*(2n-1)}{6}

Explanation:

According to the sequence,

         The difference between first 2 terms is = (4 - 1) = 3

∴ The difference between 3rd and 2nd term is = (9 - 4) = 5

∴ The difference between 4th and 3rd term is = (16 - 9) = 7

∴ The difference between 5th and 4th term is = (25 - 16) = 9

∴ So, we can understand,

             The difference between the terms increases by odd numbers that starts from 3

∴ The Nth item of the sequence is = 1 + 3 + 5 + 7 + .. + (2n - 1)

                                                         = \frac{n}{2} × (2 × 1 + (n - 1) × 2)

                                                        = n^{2}

:. The sum till the Nth item of the sequence is ,  1^{2} + 2^{2} +3^{2} +4^{2} +5^{2} + .. + n^{2} = \frac{n * (n+1)*(2n-1)}{6}

Similar questions