title: How to find the number of ways to get 21 in Blackjack?
body: <p>Some assumptions: </p>
  
  <ol>
  <li>One deck of 52 cards is used</li>
  <li>Picture cards count as 10</li>
  <li>Aces count as 1 or 11</li>
  <li>The order is not important (ie. Ace + Queen is the same as Queen + Ace)</li>
  </ol>
  
  <p>I thought I would then just sequentially try all the possible combinations and see which ones add up to 21, but there are way too many ways to mix the cards (52! ways). This approach also does not take into account that order is not important nor does it account for the fact that there are only 4 maximum types of any one card (Spade, Club, Diamond, Heart).</p>
  
  <p>Now I am thinking of the problem like this: </p>
  
  <p>We have 11 "slots". Each of these slots can have 53 possible things inside them: 1 of 52 cards or no card at all. The reason it is 11 slots is because 11 cards is the maximum amount of cards that can be dealt and still add up to 21; more than 11 cards would have to add up to more than 21. </p>
  
  <p>Then the "leftmost" slot would be incremented up by one and all 11 slots would be checked to see if they add up to 21 (0 would represent no card in the slot). If not, the next slot to the right would be incremented, and the next, and so on.</p>
  
  <p>Once the first 4 slots contain the same "card" (after four increments, the first 4 slots would all be 1), the fifth slot could not be that number as well since there are 4 numbers of any type. The fifth slot would then become the next lowest number in the remaining available cards; in the case of four 1s, the fifth slot would become a 2 and so on. </p>
  
  <p>How would you do approach this?</p>