def interval_prime_sieve(block_start_i, block_sz):
    """ create a block where index 0 represents int block_start_i and the values
        in the block are True iff the corresponding index is prime """
    block = [True] * block_sz
    for i in range(2, block_start_i):
        # compute the offset from the first block
        offset = block_start_i % i
        if offset:
            offset = i - offset
        # sieve on the block
        for block_index in range(offset, block_sz, i):
            block[block_index] = False
    return block