This problem is very similar to the fib by using dynamic programming.
The solution is using tabulation.
memo=[1]*1001
memo[0]=0
def g(n):
if n<=0:
return memo[0]
elif n<=10:
return memo[n]
for i in range(11,n+1):
memo[i]=memo[i-1]+3*memo[i-3]+7*memo[i-10]
return memo[n]
print(g(1000))