Program to find the nth Kynea number | JAVA code to find nth Kynea number ; Function to calculate nth kynea number ; Calculate nth kynea number ; Driver Program ; print nth kynea number
class GFG { static long nthKyneaNumber ( int n ) { return ( ( 1 << ( 2 * n ) ) + ( 1 << ( n + 1 ) ) - 1 ) ; } public static void main ( String [ ] args ) { int n = 2 ; System . out . println ( nthKyneaNumber ( n ) ) ; } }