Problem #314
Let's be Wholesome
S = {1, 3, 5, 7, \ldots, 6969}.
A subsequence of length 3, say {a,b,c}, is said to be bad if it satisfies the relation a < c < b.
Any rearrangement of S, say P, is said to be wholesome if there exists no bad subsequence of length 3 in it.
Calculate the number of wholesome rearrangements of S.
Report the answer modulo (10^9 + 7).
Note: A subsequence is a sequence that can be derived from the given sequence by deleting zero or more elements without changing the order of the remaining elements.