Solution :
The probability of winning when you choose n is = 

Apply log on both the sides,

Differentiation, f(x) is 
Let us find x for which f' is positive and x for which f' is negative.
, since 
For x ≤ 3, f' > 0 for 

That means f(x) is increasing function for n ≤ 3
for x > 4
f' < 0 for n ≥ 4, that means f(n) is decreasing function for n ≥ 4.
Probability of winning when you chose n = 3 is 
Probability of winning when you chose n = 4 is 
Therefore, we should chose either 3 or 4 to maximize chances of winning.
The probability of winning with an optimal choice is n = 0.375