------
## 最终结论
```python
def knightDialer(n: int) -> int:
    mod = 10**9 + 7
    # Define the knight's moves
    moves = {
        0: [4, 6],
        1: [8, 6],
        2: [7, 9],
        3: [4, 8],
        4: [0, 3, 9],
        5: [],
        6: [0, 1, 7],
        7: [2, 6],
        8: [1, 3],
        9: [2, 4]
    }
    
    # Initialize the dp array
    dp = [[0] * 10 for _ in range(n)]
    
    # Set initial condition
    for j in range(10):
        dp[0][j] = 1
    
    # Fill the dp table
    for i in range(1, n):
        for j in range(10):
            for move in moves[j]:
                dp[i][move] = (dp[i][move] + dp[i - 1][j]) % mod
    
    # Calculate result
    result = sum(dp[n - 1]) % mod
    return result

# Example usage:
print(knightDialer(1))   # Output: 10
print(knightDialer(2))   # Output: 20
print(knightDialer(3))   # Output: 46
print(knightDialer(4))   # Output: 104
print(knightDialer(3131)) # Output: 136006598
```