Consider the different combinations of 3 beads: 3 together, 3 all separate, and a bead and a pair of beads. Now the columns. With 3 columns we can choose which column to put the 3 beads together in; that gives us 3 different numbers (003, 030, 300). Separate all the beads, one per column, that's another number (111). That leaves us with a single bead and a pair, i.e., the digits 0, 1 and 2. There are 6 ways of permuting three different objects. Add this to the other 4 and we get 10, so there are 10 numbers possible using three beads and three columns.
With 4 beads, all kept together and 4 columns, there are 4 numbers. Separate the beads and put one in each column and we get one more number. That leaves us with two pairs, and a single bead and 3 together. The numbers made of two pairs consist of the digits 0, 0, 2 and 2. If this had been four different digits we would have 24 different permutations, but we only have two different digits, so we need to reduce the permutations by a factor of 2 twice, so 24/4=6. Finally we have the digits 0, 0, 1 and 3. If this had been just 0, 1 and 3, i.e., three different digits it would be similar to the 3 bead problem and there would be 6 ways of permuting these digits. The extra 0 can be at the beginning or end of each of these 6 permutations making 12 altogether. Another way of looking at it is to reduce the 24 permutations of 4 different objects by a factor of 2 to compensate for two digits (0) being the same. So to summarise by adding together all these in order we have 4 (all beads together) + 1 (all beads separate) + 6 (two pairs) + 12 (single bead and 3 beads together) = 23 different numbers.