# Tag Archives: series-sum

## 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 »

## Sum of first N terms of Quadratic Sequence 3 + 7 + 13 + …

Given a quadratic series as given below, the task is to find sum of first n terms of this series. Sn = 3 + 7… Read More »

## Program to find sum of 1 + x/2! + x^2/3! +…+x^n/(n+1)!

Given a number x and n, the task is to find the sum of the below series of x till n terms: Examples: Input: x… Read More »

## Find Sum of Series 1^2 – 2^2 + 3^2 – 4^2 ….. upto n terms

Given a number n, the task is to find the sum of the below series upto n terms: 12 – 22 + 32 – 42… Read More »

## Sum of Fibonacci Numbers with alternate negatives

Given a positive integer n, the task is to find the value of F1 – F2 + F3 -……….+ (-1)n+1Fn where Fi denotes i-th Fibonacci… Read More »

## Find the unit place digit of sum of N factorials

Given a number N, the task is to find units place digit of the first N natural numbers factorials, i.e. 1!+2!+3!+….N! where N<=10e18. Examples: Input:… Read More »

## Sum of squares of Fibonacci numbers

Given a positive integer N. The task is to find the sum of squares of all Fibonacci numbers up to N-th fibonacci number. That is,… Read More »

## Value of the series (1^3 + 2^3 + 3^3 + … + n^3) mod 4 for a given n

Given a function f(n) = (13 + 23 + 33 + … + n3), the task is to find the value of f(n) mod 4… Read More »