Implement a Python function to calculate the sum of the greatest common divisors (GCD) of all sequences of integers of a specified length, using integers from 1 to a given maximum value. The result should be returned modulo (10^9 + 7).
Functionality Requirements:
Create a function named sum_of_gcd_sequences.
The function should accept two parameters:
N (int): the length of the sequences.
K (int): the maximum integer value in the sequences.
The function should compute the sum of the GCDs of all sequences of length N that consist of integers between 1 and K (inclusive).
Input/Output:
Input:
N: An integer indicating the length of the sequences (1 ≤ N ≤ 100).
K: An integer indicating the maximum value in the sequences (1 ≤ K ≤ 1000).
Output:
The function should return an integer representing the sum of the GCDs of all valid sequences, modulo (10^9 + 7).
File Requirements:
The solution must be implemented in a file named /app/solution.py.
Please ensure that the implementation follows the provided function signature and correctly handles all edge cases.