Program to find the nth Kynea number | CPP code to find nth Kynea number ; Function to calculate nth kynea number ; Calculate nth kynea number ; Driver Program ; print nth kynea number
#include <bits/stdc++.h> NEW_LINE using namespace std ; long nthKyneaNumber ( int n ) { return ( ( 1 << ( 2 * n ) ) + ( 1 << ( n + 1 ) ) - 1 ) ; } int main ( ) { int n = 2 ; cout << nthKyneaNumber ( n ) ; return 0 ; }