I'm doing this problem where you pick a number $k= \{1,2,\ldots,n\}$ out of a hat and that number is how much money you win (the player knows the value of $n$). If he likes his pick he can keep the number and win $\$n$. If he doesn't like the pick, he can replace the number and try again. He gets three tries total but he has to keep whatever number he picks on the third try. Find $\mathbb{P}(X=k)$ where $X$ is the amount of money you win.
Okay, I figured there is an optimal number (lets call it $j$) where the person will stop if $k\geqslant j$ and keep going if $k