{"id":19936,"date":"2021-09-02T15:24:33","date_gmt":"2021-09-02T09:54:33","guid":{"rendered":"https:\/\/python-programs.com\/?p=19936"},"modified":"2021-11-22T18:36:29","modified_gmt":"2021-11-22T13:06:29","slug":"python-program-to-find-the-sum-of-series-1-x-x2-2-xn-n","status":"publish","type":"post","link":"https:\/\/python-programs.com\/python-program-to-find-the-sum-of-series-1-x-x2-2-xn-n\/","title":{"rendered":"Python Program to Find the Sum of Series 1+X+X^2\/2…+X^N\/N"},"content":{"rendered":"

In the previous article, we have discussed Python Program to Find the Sum of Series 1+X+X^3…+X^N<\/a><\/p>\n

Given the numbers, N and X and the task is to find the sum of the given series (1+X+X^2\/2…+X^N\/N)<\/strong>\u00a0for the given numbers in Python.<\/p>\n

Examples:<\/strong><\/p>\n

Example1:<\/strong><\/p>\n

Input:<\/strong><\/p>\n

Given Number = 7\r\nGiven X value = 6<\/pre>\n

Output:<\/strong><\/p>\n

The total sum of the series till the given number N and x value { 7 6 } =  49743.05714285714<\/pre>\n

Example2:<\/strong><\/p>\n

Input:<\/strong><\/p>\n

Given Number = 4\r\nGiven X value = 3<\/pre>\n

Output:<\/strong><\/p>\n

The total sum of the series till the given number N and x value { 4 3 } =  37.75<\/pre>\n

Program to Find the Sum of Series 1+X+X^2\/2…+X^N\/N in Python<\/h2>\n

Below are the ways to find the sum of the given series (1+X+X^2\/2…+X^N\/N) <\/strong>for the given numbers in Python :<\/p>\n