## Generate minimum sum sequence of integers with even elements greater

Given an integer N, the task is to generate a sequence of N positive integers such that: Every element at the even position must be… Read More »

## Program to find sum of harmonic series

Harmonic series is inverse of a arithmetic progression. In general, the terms in a harmonic progression can be denoted as 1/a, 1/(a + d), 1/(a… Read More »

## Find the sum of first N terms of the series 2*3*5, 3*5*7, 4*7*9, …

Given an integer N, the task is to find the sum of first N terms of the series: (2 * 3 * 5), (3 *… Read More »

## Sum of kth powers of first n natural numbers

Given two integers n and k, the task is to calculate and print 1k + 2k + 3k + … + nk. Examples: Input: n… Read More »

## Summing the sum series

Defined a function that calculates the twice of sum of first N natural numbers as sum(N). Your task is to modify the function to sumX(N,… Read More »

## Sum of all odd natural numbers in range L and R

Given two integers L and R, the task is to find the sum of all odd natural numbers in range L and R inclusive. Examples:… Read More »

## Sum of all natural numbers in range L to R

Given a range L and R, the task is to find the sum of all natural numbers in range L to R. Examples: Input: L… Read More »

## Sum of the elements from index L to R in an array when arr[i] = i * (-1)^i

Given two integers and and an array arr[] every element of which at index is calculated as arr[i] = i * (-1)i. The task is… Read More »

## Sum of multiples of A and B less than N

Given a number N, the task is to find the sum of all the multiples of A and B below N. Examples: Input:N = 11,… Read More »

## Program to find the sum of the series (1/a + 2/a^2 + 3/a^3 + … + n/a^n)

Given two integers and . The task is to find the sum of the series 1/a + 2/a2 + 3/a3 + … + n/an. Examples:… Read More »

## Find the sum of all multiples of 2 and 5 below N

Given a number N. The task is to find the sum of all multiples of 2 and 5 below N ( N may be up… Read More »

## Sum of first N natural numbers which are divisible by 2 and 7

Given a number N. The task is to find the sum of all those numbers from 1 to N that are divisible by 2 or… Read More »

## Find sum of N-th group of Natural Numbers

Given a series of natural numbers divided into groups as: (1, 2), (3, 4, 5, 6), (7, 8, 9, 10, 11, 12), (13, 14, 15,… Read More »

## Find the sum of series 3, -6, 12, -24 . . . upto N terms

Given an integer N. The task is to find the sum upto N terms of the given series: 3, -6, 12, -24, … upto N… Read More »

## Find the sum of first N terms of the series 2×3 + 4×4 + 6×5 + 8×6 + …

Given an integer N. The task is to find the sum upto N terms of the given series: 2×3 + 4×4 + 6×5 + 8×6… Read More »