Using the digits $0,1,5,6,7,9$,

a) how many 6-digit numbers can be formed where at least one digit is repeated?

b) how many 6-digit numbers can be formed that consist entirely of different digits and are not divisible by 4?
a) With repetition, a total of $V_{6}^{i, 6}$ groups can be formed, but from these, we must exclude those that start with 0. The latter is as many as the 5th class notebooks that can be formed with repetition from the given 6 elements, i.e., $V_{6}^{i, 5}$. Therefore, the number of 6-digit numbers that can be formed from the given digits with repetition is

$$
V_{6}^{i, 6}-V_{6}^{i, 5}=6^{6}-6^{5}=6^{5}(6-1)=7776 \cdot 5=38880.
$$

Among these variations, there are also groups without repetition, which are nothing else but the permutations of the given 6 elements, excluding those that start with 0. The number of 6-digit numbers formed from the given elements, all of which are different, is therefore

$$
P_{6}-P_{5}=6!-5!=720-120=600.
$$

Thus, the number of 6-digit numbers that can be formed from the given elements, containing at least one repeated digit, is

$$
38880-600=38280.
$$

b) The number of 6-digit numbers that can be formed from the given digits, all of which are different, as we have seen, is 600. From this number, we must subtract the number of numbers divisible by 4. Numbers ending in $60, 16, 56, 76$, and 96 are divisible by 4. The number of numbers ending in 60 is as many as the permutations that can be formed from the elements $1, 2, 3, 4$, i.e., $4!=24$. Each of the last four endings has as many numbers as the number of 4-digit numbers that can be formed from the remaining 4 digits, one of which is always 0. The number of the latter is $4!-3!=24-6=18$, because we must exclude the groups starting with 0. Therefore, the number of numbers divisible by 4 is $24+4 \cdot 18=96$, and thus the number of 6-digit numbers that can be formed from the given digits, all of which are different and not divisible by 4, is $600-96=504$.

Rockenbauer Magda (Bp. X., I. László g. III. o. t.)