One day, when you are going to class, you notice a safe with a four-digit code, where each digit is a number from 0 to 9 (inclusive). There is a note on the side of the safe that reads:
āThe third digit is one less than the first digit, the sum of the third digit and the second digit is the first digit, the third digit is twice the sum of the second digit and the fourth digit, and the sum of all four digits is 21.ā
What is the combination?