Find the Nth term in series 12 , 35 , 81 , 173 , 357 , ... | C ++ program to find the Nth term in series 12 , 35 , 81 , 173 , 357 , ... ; Function to find Nth term ; Nth term ; Driver Method
#include <bits/stdc++.h> NEW_LINE using namespace std ; int nthTerm ( int N ) { int nth = 0 , first_term = 12 ; nth = ( first_term * ( pow ( 2 , N - 1 ) ) ) + 11 * ( ( pow ( 2 , N - 1 ) ) - 1 ) ; return nth ; } int main ( ) { int N = 5 ; cout << nthTerm ( N ) << endl ; return 0 ; }