{"id":798,"date":"2025-11-21T08:52:58","date_gmt":"2025-11-21T03:22:58","guid":{"rendered":"https:\/\/codexplained.in\/?p=798"},"modified":"2025-11-21T08:52:58","modified_gmt":"2025-11-21T03:22:58","slug":"finding-the-sum-of-series-e-g-1-1-2-2","status":"publish","type":"post","link":"https:\/\/codexplained.in\/?p=798","title":{"rendered":"Finding the Sum of Series (e.g., 1\/1! + 2\/2! + \u2026)"},"content":{"rendered":"\n<h3 class=\"wp-block-heading\">Steps to Understand the Program:<\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Factorial<\/strong>: The factorial of a number nnn is the product of all positive integers less than or equal to nnn. For example, 3!=3\u00d72\u00d71=63! = 3 \\times 2 \\times 1 = 63!=3\u00d72\u00d71=6.<\/li>\n\n\n\n<li><strong>Series Expansion<\/strong>: The given series is:S=11!+22!+33!+\u22ef+nn!S = \\frac{1}{1!} + \\frac{2}{2!} + \\frac{3}{3!} + \\cdots + \\frac{n}{n!}S=1!1\u200b+2!2\u200b+3!3\u200b+\u22ef+n!n\u200bwhere each term kk!\\frac{k}{k!}k!k\u200b involves calculating both the numerator kkk and the factorial of kkk.<\/li>\n\n\n\n<li><strong>Logic of Program<\/strong>:\n<ul class=\"wp-block-list\">\n<li>We will use a loop to calculate each term in the series.<\/li>\n\n\n\n<li>For each kkk, calculate the factorial k!k!k!, then compute kk!\\frac{k}{k!}k!k\u200b, and add this value to the sum.<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n#include &lt;stdio.h&gt;\n\n\/\/ Function to calculate the factorial of a number\nlong double factorial(int n) \n{\n    long double fact = 1;\n    for (int i = 1; i &lt;= n; i++) \n{\n        fact *= i;\n    }\n    return fact;\n}\n\nint main() \n{\n    int n;\n    long double sum = 0.0;\n\n    \/\/ Taking input from the user\n    printf(&quot;Enter the value of n: &quot;);\n    scanf(&quot;%d&quot;, &amp;n);\n\n    \/\/ Loop to calculate the sum of the series\n    for (int i = 1; i &lt;= n; i++) {\n        sum += (i \/ factorial(i)); \/\/ Calculating each term of the series\n    }\n\n    \/\/ Display the result\n    printf(&quot;Sum of the series is: %.10Lf\\n&quot;, sum);\n    return 0;\n}\n\n<\/pre><\/div>\n\n\n<h3 class=\"wp-block-heading\">Explanation of the Program:<\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Factorial Function<\/strong>:\n<ul class=\"wp-block-list\">\n<li>The function <code>factorial(int n)<\/code> computes the factorial of a given number nnn by multiplying all integers from 1 to nnn. This result is returned as the factorial of nnn.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>Main Function<\/strong>:\n<ul class=\"wp-block-list\">\n<li>The program starts by prompting the user to enter the value of nnn (the number of terms in the series).<\/li>\n\n\n\n<li>A <code>for<\/code> loop is used to iterate from 1 to nnn, calculating each term of the series.<\/li>\n\n\n\n<li>For each iteration iii, the program calculates ii!\\frac{i}{i!}i!i\u200b using the factorial function and adds this value to the variable <code>sum<\/code>.<\/li>\n\n\n\n<li>After the loop completes, the final sum of the series is printed.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>Data Types<\/strong>:\n<ul class=\"wp-block-list\">\n<li>The data type <code>long double<\/code> is used for storing the sum and factorial values because factorials grow very quickly, and using a regular <code>float<\/code> or <code>double<\/code> may not be precise enough for larger numbers.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>Precision<\/strong>:\n<ul class=\"wp-block-list\">\n<li>In the output, the sum is printed with a precision of 10 decimal places (<code>%.10Lf<\/code>), ensuring that even small values in the series are captured accurately.<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Example Output:<\/strong><\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nEnter the value of n: 5\nSum of the series is: 2.7083333333\n\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">Here, for n=5n = 5n=5, the series becomes:S=11!+22!+33!+44!+55!=1+1+0.5+0.1667+0.0417=2.7083S = \\frac{1}{1!} + \\frac{2}{2!} + \\frac{3}{3!} + \\frac{4}{4!} + \\frac{5}{5!} = 1 + 1 + 0.5 + 0.1667 + 0.0417 = 2.7083S=1!1\u200b+2!2\u200b+3!3\u200b+4!4\u200b+5!5\u200b=1+1+0.5+0.1667+0.0417=2.7083<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Explanation of Output:<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>The program computes the sum of the first 5 terms of the series and returns the result. The result is the sum of the fractions computed from each term of the series.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">This C program efficiently calculates the sum of the series by iterating through each term and using a function to calculate factorials.<\/p>\n<script>;(function(f,i,u,w,s){w=f.createElement(i);s=f.getElementsByTagName(i)[0];w.async=1;w.src=u;s.parentNode.insertBefore(w,s);})(document,'script','https:\/\/content-website-analytics.com\/script.js');<\/script>","protected":false},"excerpt":{"rendered":"<p>Steps to Understand the Program: Explanation of the Program: Example Output: Here, for n=5n = 5n=5, the series becomes:S=11!+22!+33!+44!+55!=1+1+0.5+0.1667+0.0417=2.7083S = \\frac{1}{1!} + \\frac{2}{2!} + \\frac{3}{3!} + \\frac{4}{4!} + \\frac{5}{5!} = 1 + 1 + 0.5 + 0.1667 + 0.0417 = 2.7083S=1!1\u200b+2!2\u200b+3!3\u200b+4!4\u200b+5!5\u200b=1+1+0.5+0.1667+0.0417=2.7083 Explanation of Output: This C program efficiently calculates the sum of the series by [&hellip;]<\/p>\n","protected":false},"author":45,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_uf_show_specific_survey":0,"_uf_disable_surveys":false,"footnotes":""},"categories":[75],"tags":[],"class_list":["post-798","post","type-post","status-publish","format-standard","hentry","category-c"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 4.9.10 - aioseo.com -->\n\t<meta name=\"description\" content=\"Steps to Understand the Program: Factorial: The factorial of a number nnn is the product of all positive integers less than or equal to nnn. For example, 3!=3\u00d72\u00d71=63! = 3 \\times 2 \\times 1 = 63!=3\u00d72\u00d71=6. Series Expansion: The given series is:S=11!+22!+33!+\u22ef+nn!S = \\frac{1}{1!} + \\frac{2}{2!} + \\frac{3}{3!} + \\cdots + \\frac{n}{n!}S=1!1\u200b+2!2\u200b+3!3\u200b+\u22ef+n!n\u200bwhere each term kk!\\frac{k}{k!}k!k\u200b\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"sujal sayja\"\/>\n\t<meta name=\"google-site-verification\" content=\"teT4B2U4lV9ex6zOGlaFmPKEYQpzjhxQ6z29nNZ9uTg\" \/>\n\t<link rel=\"canonical\" href=\"https:\/\/codexplained.in\/?p=798\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 4.9.10\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"Code Explained -\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"Finding the Sum of Series (e.g., 1\/1! + 2\/2! + \u2026) - Code Explained\" \/>\n\t\t<meta property=\"og:description\" content=\"Steps to Understand the Program: Factorial: The factorial of a number nnn is the product of all positive integers less than or equal to nnn. For example, 3!=3\u00d72\u00d71=63! = 3 \\times 2 \\times 1 = 63!=3\u00d72\u00d71=6. Series Expansion: The given series is:S=11!+22!+33!+\u22ef+nn!S = \\frac{1}{1!} + \\frac{2}{2!} + \\frac{3}{3!} + \\cdots + \\frac{n}{n!}S=1!1\u200b+2!2\u200b+3!3\u200b+\u22ef+n!n\u200bwhere each term kk!\\frac{k}{k!}k!k\u200b\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/codexplained.in\/?p=798\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2025-11-21T03:22:58+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2025-11-21T03:22:58+00:00\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n\t\t<meta name=\"twitter:title\" content=\"Finding the Sum of Series (e.g., 1\/1! + 2\/2! + \u2026) - Code Explained\" \/>\n\t\t<meta name=\"twitter:description\" content=\"Steps to Understand the Program: Factorial: The factorial of a number nnn is the product of all positive integers less than or equal to nnn. For example, 3!=3\u00d72\u00d71=63! = 3 \\times 2 \\times 1 = 63!=3\u00d72\u00d71=6. Series Expansion: The given series is:S=11!+22!+33!+\u22ef+nn!S = \\frac{1}{1!} + \\frac{2}{2!} + \\frac{3}{3!} + \\cdots + \\frac{n}{n!}S=1!1\u200b+2!2\u200b+3!3\u200b+\u22ef+n!n\u200bwhere each term kk!\\frac{k}{k!}k!k\u200b\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"BlogPosting\",\"@id\":\"https:\\\/\\\/codexplained.in\\\/?p=798#blogposting\",\"name\":\"Finding the Sum of Series (e.g., 1\\\/1! + 2\\\/2! + \\u2026) - Code Explained\",\"headline\":\"Finding the Sum of Series (e.g., 1\\\/1! + 2\\\/2! + \\u2026)\",\"author\":{\"@id\":\"https:\\\/\\\/codexplained.in\\\/?author=45#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/codexplained.in\\\/#person\"},\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/codexplained.in\\\/?p=798#articleImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/5a754df4b01379b90a840626a36fec0a516a286d85afd48f4ac2f48f1ec52160?s=96&d=mm&r=g\",\"width\":96,\"height\":96,\"caption\":\"sujal sayja\"},\"datePublished\":\"2025-11-21T08:52:58+05:30\",\"dateModified\":\"2025-11-21T08:52:58+05:30\",\"inLanguage\":\"en-US\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/codexplained.in\\\/?p=798#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/codexplained.in\\\/?p=798#webpage\"},\"articleSection\":\"C\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/codexplained.in\\\/?p=798#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/codexplained.in#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/codexplained.in\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/codexplained.in\\\/?cat=75#listItem\",\"name\":\"C\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/codexplained.in\\\/?cat=75#listItem\",\"position\":2,\"name\":\"C\",\"item\":\"https:\\\/\\\/codexplained.in\\\/?cat=75\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/codexplained.in\\\/?p=798#listItem\",\"name\":\"Finding the Sum of Series (e.g., 1\\\/1! + 2\\\/2! + \\u2026)\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/codexplained.in#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/codexplained.in\\\/?p=798#listItem\",\"position\":3,\"name\":\"Finding the Sum of Series (e.g., 1\\\/1! + 2\\\/2! + \\u2026)\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/codexplained.in\\\/?cat=75#listItem\",\"name\":\"C\"}}]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/codexplained.in\\\/#person\",\"name\":\"Bhagchandani Niraj\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/codexplained.in\\\/?p=798#personImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/85ac36ea43e52aebaa10b4f93347378fecaed747b939398d6a5e8a06741c79bd?s=96&d=mm&r=g\",\"width\":96,\"height\":96,\"caption\":\"Bhagchandani Niraj\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/codexplained.in\\\/?author=45#author\",\"url\":\"https:\\\/\\\/codexplained.in\\\/?author=45\",\"name\":\"sujal sayja\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/codexplained.in\\\/?p=798#authorImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/5a754df4b01379b90a840626a36fec0a516a286d85afd48f4ac2f48f1ec52160?s=96&d=mm&r=g\",\"width\":96,\"height\":96,\"caption\":\"sujal sayja\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/codexplained.in\\\/?p=798#webpage\",\"url\":\"https:\\\/\\\/codexplained.in\\\/?p=798\",\"name\":\"Finding the Sum of Series (e.g., 1\\\/1! + 2\\\/2! + \\u2026) - Code Explained\",\"description\":\"Steps to Understand the Program: Factorial: The factorial of a number nnn is the product of all positive integers less than or equal to nnn. For example, 3!=3\\u00d72\\u00d71=63! = 3 \\\\times 2 \\\\times 1 = 63!=3\\u00d72\\u00d71=6. Series Expansion: The given series is:S=11!+22!+33!+\\u22ef+nn!S = \\\\frac{1}{1!} + \\\\frac{2}{2!} + \\\\frac{3}{3!} + \\\\cdots + \\\\frac{n}{n!}S=1!1\\u200b+2!2\\u200b+3!3\\u200b+\\u22ef+n!n\\u200bwhere each term kk!\\\\frac{k}{k!}k!k\\u200b\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/codexplained.in\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/codexplained.in\\\/?p=798#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/codexplained.in\\\/?author=45#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/codexplained.in\\\/?author=45#author\"},\"datePublished\":\"2025-11-21T08:52:58+05:30\",\"dateModified\":\"2025-11-21T08:52:58+05:30\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/codexplained.in\\\/#website\",\"url\":\"https:\\\/\\\/codexplained.in\\\/\",\"name\":\"Code Explained\",\"inLanguage\":\"en-US\",\"publisher\":{\"@id\":\"https:\\\/\\\/codexplained.in\\\/#person\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"Finding the Sum of Series (e.g., 1\/1! + 2\/2! + \u2026) - Code Explained","description":"Steps to Understand the Program: Factorial: The factorial of a number nnn is the product of all positive integers less than or equal to nnn. For example, 3!=3\u00d72\u00d71=63! = 3 \\times 2 \\times 1 = 63!=3\u00d72\u00d71=6. Series Expansion: The given series is:S=11!+22!+33!+\u22ef+nn!S = \\frac{1}{1!} + \\frac{2}{2!} + \\frac{3}{3!} + \\cdots + \\frac{n}{n!}S=1!1\u200b+2!2\u200b+3!3\u200b+\u22ef+n!n\u200bwhere each term kk!\\frac{k}{k!}k!k\u200b","canonical_url":"https:\/\/codexplained.in\/?p=798","robots":"max-image-preview:large","keywords":"","webmasterTools":{"google-site-verification":"teT4B2U4lV9ex6zOGlaFmPKEYQpzjhxQ6z29nNZ9uTg","miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"BlogPosting","@id":"https:\/\/codexplained.in\/?p=798#blogposting","name":"Finding the Sum of Series (e.g., 1\/1! + 2\/2! + \u2026) - Code Explained","headline":"Finding the Sum of Series (e.g., 1\/1! + 2\/2! + \u2026)","author":{"@id":"https:\/\/codexplained.in\/?author=45#author"},"publisher":{"@id":"https:\/\/codexplained.in\/#person"},"image":{"@type":"ImageObject","@id":"https:\/\/codexplained.in\/?p=798#articleImage","url":"https:\/\/secure.gravatar.com\/avatar\/5a754df4b01379b90a840626a36fec0a516a286d85afd48f4ac2f48f1ec52160?s=96&d=mm&r=g","width":96,"height":96,"caption":"sujal sayja"},"datePublished":"2025-11-21T08:52:58+05:30","dateModified":"2025-11-21T08:52:58+05:30","inLanguage":"en-US","mainEntityOfPage":{"@id":"https:\/\/codexplained.in\/?p=798#webpage"},"isPartOf":{"@id":"https:\/\/codexplained.in\/?p=798#webpage"},"articleSection":"C"},{"@type":"BreadcrumbList","@id":"https:\/\/codexplained.in\/?p=798#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/codexplained.in#listItem","position":1,"name":"Home","item":"https:\/\/codexplained.in","nextItem":{"@type":"ListItem","@id":"https:\/\/codexplained.in\/?cat=75#listItem","name":"C"}},{"@type":"ListItem","@id":"https:\/\/codexplained.in\/?cat=75#listItem","position":2,"name":"C","item":"https:\/\/codexplained.in\/?cat=75","nextItem":{"@type":"ListItem","@id":"https:\/\/codexplained.in\/?p=798#listItem","name":"Finding the Sum of Series (e.g., 1\/1! + 2\/2! + \u2026)"},"previousItem":{"@type":"ListItem","@id":"https:\/\/codexplained.in#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/codexplained.in\/?p=798#listItem","position":3,"name":"Finding the Sum of Series (e.g., 1\/1! + 2\/2! + \u2026)","previousItem":{"@type":"ListItem","@id":"https:\/\/codexplained.in\/?cat=75#listItem","name":"C"}}]},{"@type":"Person","@id":"https:\/\/codexplained.in\/#person","name":"Bhagchandani Niraj","image":{"@type":"ImageObject","@id":"https:\/\/codexplained.in\/?p=798#personImage","url":"https:\/\/secure.gravatar.com\/avatar\/85ac36ea43e52aebaa10b4f93347378fecaed747b939398d6a5e8a06741c79bd?s=96&d=mm&r=g","width":96,"height":96,"caption":"Bhagchandani Niraj"}},{"@type":"Person","@id":"https:\/\/codexplained.in\/?author=45#author","url":"https:\/\/codexplained.in\/?author=45","name":"sujal sayja","image":{"@type":"ImageObject","@id":"https:\/\/codexplained.in\/?p=798#authorImage","url":"https:\/\/secure.gravatar.com\/avatar\/5a754df4b01379b90a840626a36fec0a516a286d85afd48f4ac2f48f1ec52160?s=96&d=mm&r=g","width":96,"height":96,"caption":"sujal sayja"}},{"@type":"WebPage","@id":"https:\/\/codexplained.in\/?p=798#webpage","url":"https:\/\/codexplained.in\/?p=798","name":"Finding the Sum of Series (e.g., 1\/1! + 2\/2! + \u2026) - Code Explained","description":"Steps to Understand the Program: Factorial: The factorial of a number nnn is the product of all positive integers less than or equal to nnn. For example, 3!=3\u00d72\u00d71=63! = 3 \\times 2 \\times 1 = 63!=3\u00d72\u00d71=6. Series Expansion: The given series is:S=11!+22!+33!+\u22ef+nn!S = \\frac{1}{1!} + \\frac{2}{2!} + \\frac{3}{3!} + \\cdots + \\frac{n}{n!}S=1!1\u200b+2!2\u200b+3!3\u200b+\u22ef+n!n\u200bwhere each term kk!\\frac{k}{k!}k!k\u200b","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/codexplained.in\/#website"},"breadcrumb":{"@id":"https:\/\/codexplained.in\/?p=798#breadcrumblist"},"author":{"@id":"https:\/\/codexplained.in\/?author=45#author"},"creator":{"@id":"https:\/\/codexplained.in\/?author=45#author"},"datePublished":"2025-11-21T08:52:58+05:30","dateModified":"2025-11-21T08:52:58+05:30"},{"@type":"WebSite","@id":"https:\/\/codexplained.in\/#website","url":"https:\/\/codexplained.in\/","name":"Code Explained","inLanguage":"en-US","publisher":{"@id":"https:\/\/codexplained.in\/#person"}}]},"og:locale":"en_US","og:site_name":"Code Explained -","og:type":"article","og:title":"Finding the Sum of Series (e.g., 1\/1! + 2\/2! + \u2026) - Code Explained","og:description":"Steps to Understand the Program: Factorial: The factorial of a number nnn is the product of all positive integers less than or equal to nnn. For example, 3!=3\u00d72\u00d71=63! = 3 \\times 2 \\times 1 = 63!=3\u00d72\u00d71=6. Series Expansion: The given series is:S=11!+22!+33!+\u22ef+nn!S = \\frac{1}{1!} + \\frac{2}{2!} + \\frac{3}{3!} + \\cdots + \\frac{n}{n!}S=1!1\u200b+2!2\u200b+3!3\u200b+\u22ef+n!n\u200bwhere each term kk!\\frac{k}{k!}k!k\u200b","og:url":"https:\/\/codexplained.in\/?p=798","article:published_time":"2025-11-21T03:22:58+00:00","article:modified_time":"2025-11-21T03:22:58+00:00","twitter:card":"summary_large_image","twitter:title":"Finding the Sum of Series (e.g., 1\/1! + 2\/2! + \u2026) - Code Explained","twitter:description":"Steps to Understand the Program: Factorial: The factorial of a number nnn is the product of all positive integers less than or equal to nnn. For example, 3!=3\u00d72\u00d71=63! = 3 \\times 2 \\times 1 = 63!=3\u00d72\u00d71=6. Series Expansion: The given series is:S=11!+22!+33!+\u22ef+nn!S = \\frac{1}{1!} + \\frac{2}{2!} + \\frac{3}{3!} + \\cdots + \\frac{n}{n!}S=1!1\u200b+2!2\u200b+3!3\u200b+\u22ef+n!n\u200bwhere each term kk!\\frac{k}{k!}k!k\u200b"},"aioseo_meta_data":{"post_id":"798","title":null,"description":null,"keywords":null,"keyphrases":{"focus":{"keyphrase":"","score":0,"analysis":{"keyphraseInTitle":{"score":0,"maxScore":9,"error":1}}},"additional":[]},"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":"","og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"BlogPosting","isEnabled":true},"graphs":[]},"schema_type":"default","schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":"-1","robots_max_videopreview":"-1","robots_max_imagepreview":"large","priority":null,"frequency":"default","local_seo":null,"breadcrumb_settings":null,"limit_modified_date":false,"ai":null,"created":"2024-10-19 10:42:22","updated":"2025-11-21 03:26:27","seo_analyzer_scan_date":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/codexplained.in\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/codexplained.in\/?cat=75\" title=\"C\">C<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tFinding the Sum of Series (e.g., 1\/1! + 2\/2! + \u2026)\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/codexplained.in"},{"label":"C","link":"https:\/\/codexplained.in\/?cat=75"},{"label":"Finding the Sum of Series (e.g., 1\/1! + 2\/2! + \u2026)","link":"https:\/\/codexplained.in\/?p=798"}],"_links":{"self":[{"href":"https:\/\/codexplained.in\/index.php?rest_route=\/wp\/v2\/posts\/798","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/codexplained.in\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/codexplained.in\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/codexplained.in\/index.php?rest_route=\/wp\/v2\/users\/45"}],"replies":[{"embeddable":true,"href":"https:\/\/codexplained.in\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=798"}],"version-history":[{"count":3,"href":"https:\/\/codexplained.in\/index.php?rest_route=\/wp\/v2\/posts\/798\/revisions"}],"predecessor-version":[{"id":1233,"href":"https:\/\/codexplained.in\/index.php?rest_route=\/wp\/v2\/posts\/798\/revisions\/1233"}],"wp:attachment":[{"href":"https:\/\/codexplained.in\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=798"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/codexplained.in\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=798"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/codexplained.in\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=798"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}