You’d be forgiven for thinking 3 would be the best choice, as a third of three digit numbers are divisible by 3, however any number that isn’t a multiple of 3 can’t be rearranged to become one.
In fact of the 6^3=216 possible rolls, 72, exactly a third, are a multiple of 3.
For 5, all you would need is for at least one of the rolls to be a 5, and for you to place that at the end of the number. There are 91/216, around 42% would win for you, so a better bet than 3.
However there is only one choice of ‘n’ that gives you a better than evens chance of winning the bet, and that is 7. Of the 216 rolls, 126 are, or can be rearranged to form, a multiple of 7, giving you a win percentage of over 58%.
Listed below are all of the possible winning numbers. Any with three different digits can be rolled in six different ways, and any with a repeated digit, in three ways:
112 126 133 154 161 224 231 245 252 266 315 322
336 343 364 413 434 441 455 462 511 525 532 546
553 616 623 644 651 665
And below in the winning percentage for the first few odd primes (a composite number couldn’t be the best bet as will always be at least equalled by its prime factors) :
3 33.3%
5 42.1%
7 58.3%
11 22.2%
13 36.1%
17 23.6%
19 26.4%
23 16.7%