Function to find the number of subsequences of the given array with a sum in range [ L , R ] and the difference between the maximum and minimum element is at least X
def numberofSubsequences ( a , L , R , X , n ) : NEW_LINE