Find a number containing N | C # implementation of the approach ; Function to compute number using our deduced formula ; Initialize num to n - 1 ; Driver code
using System ; class GFG { static int findNumber ( int n ) { int num = n - 1 ; num = 2 * ( int ) Math . Pow ( 4 , num ) ; num = ( int ) Math . Floor ( num / 3.0 ) ; return num ; } static public void Main ( ) { int n = 5 ; Console . Write ( findNumber ( n ) ) ; } }