Ratio of mth and nth terms of an A. P. with given ratio of sums

Given that the ratio to sum of first m and n terms of an A.P. with first term ‘a’ and commond difference ‘d’ is m^2:n^2.… Read More »

Ratio of mth and nth term in an Arithmetic Progression (AP)

Given two values ‘m’ and ‘n’ and the 5th term of an arithmetic progression is zero. The task is to find the ratio of mth… Read More »

Sum of first n terms of a given series 3, 6, 11, …..

Given a series and a number n, the task is to find the sum of its first n terms. Below is the series: 3, 6,… Read More »

Find First element in AP which is multiple of given prime

Given the first term (A) and common difference (D) of an Arithmetic Progression, and a prime number (P). The task is to find the position… Read More »

Minimum number of changes required to make the given array an AP

Given an array arr[] of integers and a number . You can change any element of the array to any integer. The task is to… Read More »

Longest arithmetic progression with the given common difference

Given an unsorted array of size n and an integer d which is the common difference, the task is to find the length of the… Read More »

Longest string in non-decreasing order of ASCII code and in arithmetic progression

Given a non-empty string S of uppercase alphabets of length L and the task is to find the longest string from the given string with… Read More »

n-th number whose sum of digits is ten

Given an integer value n, find out the n-th positive integer whose sum is 10. Examples: Input : n = 2 Output : 28 The… Read More »

Probability for three randomly chosen numbers to be in AP

Given a number n and an array containing 1 to (2n+1) consecutive numbers. Three elements are chosen at random. Find the probability that the elements… Read More »

PHP program to print an arithmetic progression series using inbuilt functions

We have to print an arithmetic progressive series in PHP, between two given numbers a and b both including, with a given common arithmetic difference… Read More »

Find N Arithmetic Means between A and B

Given three integers A, B and N the task is to find N Arithmetic means between A and B. We basically need to insert N… Read More »

Sum of n digit numbers divisible by a given number

Given n and a number, the task is to find the sum of n digit numbers that are divisible by given number. Examples: Input :… Read More »

Sum of series with alternate signed squares of AP

We are given the Integer n and also in the next line 2*n integers which represent a Arithmetic Progression series a1, a2, a3…a2n they are… Read More »

Print all triplets in sorted array that form AP

Given a sorted array of distinct positive integers, print all triplets that form AP (or Arithmetic Progression) Examples : Input : arr[] = { 2,… Read More »

Program for N-th term of Arithmetic Progression series

Given first term (a), common difference (d) and a integer N of the Arithmetic Progression series, the task is to find Nthterm of the series.… Read More »