Loading repovive.com/problems/quant/4
Let V_s be the optimal value at current score s. Stopping gives s. Rolling gives (V_{s+1}+V_{s+2}+V_{s+3}+V_{s+4}+V_{s+5})/6, because rolling a 6 contributes 0. For large s, stopping is clearly optimal, so work backward. The recursion gives V_14 = 85/6, which is greater than 14, while V_15 = 15 and rolling from 15 is not better. Therefore the smallest stopping score is 15.