A few hours earlier, I got this puzzle:
Suppose, you toss a coin n times, then what is the probability of getting m number of heads? ( where m belongs to the set of all prime numbers)
For instance, take n = 2, then
SS = { HH, HT, TH, TT }
So, output is 1/4 (for HH case)
Then, for n = 3,
SS = { HHH, HHT, HTH, THH, HTT, THT, TTH, TTT }
So, output is (1 + 3)/8 (for 3 H's case and 2 H's cases respectively)
Input: n ( an integer, 0 <= n <= 1000 )
Output: The probability (in any distinguishable form, i.e., decimal, exponential, fraction, etc)
This is a code-golf, so fewest bytes would win!