------
## 最终结论
```python
from collections import deque

def maxSumSubsequence(nums, k):
    n = len(nums)
    dp = [0] * n
    dp[0] = nums[0]
    deq = deque([0])

    for i in range(1, n):
        while deq and deq[0] < i - k:
            deq.popleft()

        dp[i] = nums[i] + (dp[deq[0]] if deq else 0)

        while deq and dp[i] >= dp[deq[-1]]:
            deq.pop()

        deq.append(i)

    return max(dp)

# Example usage:
nums1 = [10, 2, -10, 5, 20]
k1 = 2
print(maxSumSubsequence(nums1, k1)) # Output: 37

nums2 = [-1, -2, -3]
k2 = 1
print(maxSumSubsequence(nums2, k2)) # Output: -1

nums3 = [10, -2, -10, -5, 20]
k3 = 2
print(maxSumSubsequence(nums3, k3)) # Output: 23
```