Sum of all the numbers in the Nth parenthesis
Given an integer N and a sequence (1), (3, 5), (7, 9, 11), (13, 15, 17, 19), ..... the task is to find the sum of all the numbers in Nth parenthesis.Examples: Input: N = 2 Output: 8 3 + 5 = 8Input: N = 3 Output: 27 7 + 9 + 11 = 27 Approach: It can be observed that for the values of N = 1, 2, 3, ...