Sudhir sharma has Published 1206 Articles

C++ program to find Nth term of the series 3, 14, 39, 84…

sudhir sharma

sudhir sharma

Updated on 15-Mar-2021 10:42:43

137 Views

In this problem, we are given an integer N. Our task is to create a program to Find Nth term of series 3, 14, 39, 84…Let’s take an example to understand the problem, InputN = 4Output84Explanation4th term − ( (4*4*4) + (4*4) + 4 ) = 64 + 16 + ... Read More

C++ program to find Nth term of the series 1, 8, 54, 384…

sudhir sharma

sudhir sharma

Updated on 15-Mar-2021 10:41:39

107 Views

In this problem, we are given an integer N. Our task is to create a program to Find Nth term of series 1, 8, 54, 384 ...Let’s take an example to understand the problem, InputN = 4Output384Explanation4th term − (4 * 4 * (4!) = 384Solution ApproachA simple approach to ... Read More

C++ program to find Nth term of the series 1, 6, 18, 40, 75, ….

sudhir sharma

sudhir sharma

Updated on 15-Mar-2021 10:40:07

189 Views

In this problem, we are given an integer N. Our task is to create a program to Find Nth term of series 1, 6, 18, 40, 75 ...Let’s take an example to understand the problem, InputN = 4Output40Explanation4th term − (4 * 4 * 5 ) / 2 = 40Solution ... Read More

C++ program to find Nth term of the series 1, 5, 32, 288 …

sudhir sharma

sudhir sharma

Updated on 15-Mar-2021 10:38:54

137 Views

In this problem, we are given an integer N. Our task is to create a program to Find Nth term of series 1, 5, 32, 288 ...Let’s take an example to understand the problem, InputN = 4Output288Explanation4th term − (4^4) + (3^3) + (2^2) + (1^1) = 256 + 27 ... Read More

C++ program to Find Nth term of the series 1, 1, 2, 6, 24…

sudhir sharma

sudhir sharma

Updated on 15-Mar-2021 10:37:36

422 Views

In this problem, we are given an integer N. Our task is to create a program to Find Nth term of series 1, 1, 2, 6, 24, ...Let’s take an example to understand the problem, InputN = 7Output720ExplanationThe series is − 1, 1, 2, 6, 24, 120, 720Solution ApproachA simple ... Read More

C++ program to find nth Term of the Series 1 2 2 4 4 4 4 8 8 8 8 8 8 8 8 …

sudhir sharma

sudhir sharma

Updated on 15-Mar-2021 10:36:19

129 Views

In this problem, we are given an integer N. Our task is to create a program to Find Nth term of series 1, 2, 2, 4, 4, 4, 4, 8, 8, 8, 8, 8, 8, 8, 8…Let’s take an example to understand the problem, InputN = 7Output4Solution ApproachA simple approach ... Read More

C++ program to find Nth term of the series 0, 2, 4, 8, 12, 18…

sudhir sharma

sudhir sharma

Updated on 13-Mar-2021 13:20:47

303 Views

In this problem, we are given an integer N. Our task is to create a program to Find Nth term of series 0, 2, 4, 8, 12, 18…Let’s take an example to understand the problem, InputN = 5Output12Solution ApproachA simple approach to solve the problem is the formula for the ... Read More

C++ program to find Nth term of series 1, 4, 15, 72, 420…

sudhir sharma

sudhir sharma

Updated on 13-Mar-2021 13:19:57

325 Views

In this problem, we are given an integer N. Our task is to create a program to Find Nth term of series 1, 4, 15, 72, 420…Let’s take an example to understand the problem, InputN = 4Output72Solution ApproachA simple approach to solve the problem is the formula for the Nth ... Read More

Find Nth term (A matrix exponentiation example) in C++

sudhir sharma

sudhir sharma

Updated on 13-Mar-2021 13:17:32

151 Views

In this problem, we are given an integer N and a recursive function that given Nth term as a function of other terms. Our task is to create a program to Find Nth term (A matrix exponentiation example).The function isT(n) = 2*( T(n-1) ) + 3*( T(n-2) ) Initial values ... Read More

Find Nth positive number whose digital root is X in C++

sudhir sharma

sudhir sharma

Updated on 13-Mar-2021 13:15:37

104 Views

In this problem, we are given two integer values N and X. Our task is to create a program to Find Nth positive number whose digital root is X.Digital Root (X) is a single digit positive number which is found by adding digits of N recursively adding digits, till the ... Read More

Advertisements