<jupyter_start><jupyter_text>Sequence of SequenceGiven two integers m & n, find the number of possible sequences of length n such that each of the next element is greater than or equal to twice of the previous element but less than or equal to m.<jupyter_code>def sequence(m, n, arr, level) :
    if level == n-1 :
        if arr[-1] <= m :
            return(m-arr[-1]+1)
    else :
        if level != 0 :
            arr[level] = 2*arr[level-1]
        a = arr[level]
        while arr[level]*(2**())
        

test = int(input())
for cases in range(test) :
    [m, n] = list(map(int, input().strip().split(' ')))
    arr = [0]*n
    arr[0] = 1
    for i in range(1, n) :
        arr[i] = 2*arr[i-1]
    count = sequence(m, n, arr, 1)
    print(count)<jupyter_output>1
 12 1
{'fraction_non_alphanumeric': 0.14157014157014158, 'fraction_numerical': 0.02445302445302445, 'mean_word_length': 2.4273127753303965, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '624663', 'license': 'MIT', 'n_tokens_mistral': 283, 'n_tokens_neox': 270, 'n_words': 91, 'path': 'questions/q8_sequence_of_sequence/Sequence_of_Sequence.ipynb', 'repo_name': 'aadhityasw/Competitive-Programs', 'size': '777'}