@quant_wiz
I started with n=100 and k=1,2,3 to build intuition. The expected value of k rolls depends on the expected value of k-1 rolls and you can use this to determine what to do depending on the outcome of the kth roll (stop or keep rolling) and probability you take each decision.
My