## Sum of range in a series of first odd then even natural numbers

The sequence first consists of all the odd numbers starting from 1 to n and then remaining even numbers starting 2 up to n. Let’s… Read More »

The sequence first consists of all the odd numbers starting from 1 to n and then remaining even numbers starting 2 up to n. Let’s… Read More »

Given a number n, find the n-th term in the series 3, 13, 42, 108, 235… Examples: Input : 3 Output : 42 Input :… Read More »

Given an integer ‘n’, print the first ‘n’ terms of the Moser-de Bruijn Sequence. The Moser-de Bruijn sequence is the sequence obtained by adding up… Read More »

A number is termed as a tetrahedral number if it can be represented as a pyramid with a triangular base and three sides, called a… Read More »

Find the sum of series M/1 + (M+P)/2 + (M+2*P)/4 + (M+3*P)/8……up to infinite where M and P are positive integers. Examples: Input : M… Read More »

A frugal number is a number whose number of digits is strictly greater than the number of digits in its prime factorization (including exponents). If… Read More »

Given a number n, find the n-th number which is both a square and a cube. First few such numbers are 1, 64, 729, …… Read More »

Given a number s (1 <= s <= 1000000000). If s is sum of the cubes of the first n natural numbers then print n,… Read More »

A Square pyramidal number represents sum of squares of first natural numbers. First few Square pyramidal numbers are 1, 5, 14, 30, 55, 91, 140,… Read More »

A positive integer is considered a good number if sum of its digits is even. Find n-th smallest good number. Examples : Input : n… Read More »

Given a number n, check it is the Stella Octangula number or not. A number of the form where n is a whole number(0, 1,… Read More »

Given an integer n. we have to find the nth term of Stern’s Diatomic Series. Stern’s diatomic series is the sequence which generates the following… Read More »

Given a number n, check it is the Almost Perfect number or not. Almost perfect number is a natural number whose sum of all divisors… Read More »

Given n number of buckets and each bucket is numbered from 1 to n and flowers in it are equal to triangular numbers. You have… Read More »

We are given an integer n and n-th term in a series as expressed below: Tn = n2 – (n-1)2 We need to find Sn… Read More »