def num_to_data_len(num):
    """
    Convert a permutation number to the length of data it represents
    """
    # Strip off the leading 1 that was added to make the math work
    data = int(bin(num)[3:], 2)
    # Convert from the integer form back to a string
    data = hex(data)[2:]
    # Return the length of the data
    return len(data) // 2