N | C ++ program to find the N - th term in 1 , 11 , 55 , 239 , 991 , ... . ; Function to find the N - th term ; calculates the N - th term ; Driver Code
#include <bits/stdc++.h> NEW_LINE using namespace std ; int numberSequence ( int n ) { int num = pow ( 4 , n ) - pow ( 2 , n ) - 1 ; return num ; } int main ( ) { int n = 4 ; cout << numberSequence ( n ) ; return 0 ; }