To demonstrate a method for computing the limit itself, let's pick a small value of n. If n = 3, then our limit is
Let a = 1 and b the cosine product, and write them as
with
Now we use the identity
to rationalize the numerator. This gives
As x approaches 0, both a and b approach 1, so the polynomial in a and b in the denominator approaches 6, and our original limit reduces to
For the remaining limit, use the Taylor expansion for cos(x) :
where essentially means that all the other terms in the expansion grow as quickly as or faster than x⁴; in other words, the expansion behaves asymptotically like x⁴. As x approaches 0, all these terms go to 0 as well.
Then
so in our limit, the constant terms cancel, and the asymptotic terms go to 0, and we end up with
Unfortunately, this doesn't agree with the limit we want, so n ≠ 3. But you can try applying this method for larger n, or computing a more general result.
Edit: some scratch work suggests the limit is 10 for n = 6.