N | Function to find the N - th term ; calculates the N - th term ; Driver Code
function numberSequence ( n ) { let num = Math . pow ( 4 , n ) - Math . pow ( 2 , n ) - 1 ; return num ; } let n = 4 ; document . write ( numberSequence ( n ) ) ;