Can anyone help me in dp problem. problem statement is as following. Find how many numbers of length n are there such that each number is at least 4 smaller/greater than the number before and after it.
E.g. if n = 5, such numbers are 39518, 15951, etc.