In my opinion, this formula has value in teaching Mathematics (not only to kids). It can be used to illustrate what exactly is Math (as a science of rigorous problem statements and reasonnings). It can be used to explain that Math does not reduce to, or necessarily imply, complicated formulas. It can be used to explain the deep implications of the question “Is there a (practical) formula for the nth prime?”, and why Willan’s “formula” (and many alike) is not an answer to the question.
I do not need to recall that, absent of a “true” formula, a brute-force approach is necessary, that is testing exhaustively for primality condition. Conversely then, a formula is not an answer to the question if it is just a disguised form of the exhaustive search approach, or even worse, the computation it implies is greater than that of a search algorithm. It is quite easy to determine that Willan’s solution is not an answer, in this sense of "no pratical use". The demonstration holds in one page (out of the 3-page publication) and is quite easy to follow. But we can do that by dissecting the formula itself.
We have a first summation to perform, over index k=1 to 2^n. Why? Simply because 2^n is large enough so that we are sure that the nth prime we are looking for is in the set of integers less than 2^n. This is a first clue that the so-called “formula” could be a disguised exhaustive search (in the set of integers [1,2^n]).
Next, let’s dissect the inner second summation, with index i=1 to k. What if this is a disguised primality test for all integers <k? That is, the terms of the summation use a function that takes value 1 if index i is prime and 0 otherwise. And sure, the cosinus is there just for that (see Eq. 1 in Willan’s proof). At this point, we can conclude, mathematically, that the whole exercise is to disguise an exhaustive search. But we can also point out that it is a very inefficient search. Eratosthène’s method (280BC) is less computing intensive.
In fact, anyone trying to "program" such a formula will quickly ditch it in the bin. Those who never try, will marvel at it as a "discovery".