This is a bit longer way to find. But,
Let's choose six spaces to be filled with numbers. First one can be filled in 49 ways. Then consider scenarios as to how to chose the next number such that it is distinct and not adjacent to the first one. If the first space is either of 1 or 49, then the second space can be chosen in 47 ways. And so on. However, if the first space is not 1 or 49, then you can choose the second space in 46 ways. Make 2 such scenarios and conclude.