Could someone explain this to me, in small words? Excluding “0” seems to be a big hint, but what’s the formula used?

Not sure of the mechanics of it yet, but if you add the remaining numbers and divide by two, you get the number it comes up with.

Well that seemed to work for 3 digits, not sure about 4 yet.

Given a number, you know how you can add up the digits to find its remainder when divided by 9? So, if you take a number, then rearrange its digits to form a new number, both of those numbers have the same remainder when divided by 9. That means, when you subtract them, the difference you get is actually divisible by 9, so its digits add up to a multiple of 9. If you give me all but one of the digits, I can pick the unique digit that will make the sum of all digits be a multiple of 9. (The one digit you omit can’t be zero, because then I couldn’t tell if the missing digit should be zero or nine itself).