For an explanation, refer to:
The analytical solution with due generalization submitted by Jer in this location.
The computer program assisted solution submitted by Charlie in this location.
blackjack
flooble's webmaster puzzle