Driver code
public static void main ( String [ ] args ) { int A [ ] = { 1 , 3 , 7 , 15 , 31 } ; int n = A . length ; System . out . println ( CheckForSequence ( A , n , 18 ) ? " True " : " False " ) ; } }