import random


def generate_ascending_array(power):
    """Generate an array of integers sorted in ascending order."""
    A = []
    for k in range((2**power)+1):
        A.append(random.randint(-1000000, 1000000))

    return sorted(A)