Given an integer n, the task is to find the sum of the series 11 + 22 + 33 + ….. + nn using recursion.
Input: n = 2
11 + 22 = 1 + 4 = 5
Input: n = 3
11 + 22 + 33 = 1 + 4 + 27 = 32
Approach: Starting from n, start adding all the terms of the series one by one with the value of n getting decremented by 1 in each recursive call until the value of n = 1 for which return 1 as 11 = 1.
Below is the implementation of the above approach:
GeeksforGeeks has prepared a complete interview preparation course with premium videos, theory, practice problems, TA support and many more features. Please refer Placement 100 for details
- Find geometric sum of the series using recursion
- Find the value of ln(N!) using Recursion
- Tail Recursion
- Solving f(n)= (1) + (2*3) + (4*5*6) ... n using Recursion
- Reversing a queue using recursion
- Generating subarrays using recursion
- Generating all possible Subsequences using Recursion
- Sort the Queue using Recursion
- Sum of even elements of an Array using Recursion
- Program to Calculate e^x by Recursion
- Sum of natural numbers using recursion
- Sum of digit of a number using recursion
- Product of 2 Numbers using Recursion
- Product of 2 numbers using recursion | Set 2
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.