Nitrogen recovery for various membrane selectivities