Problem 7.7.1. A seven-digit natural number $N$ is called interesting if:

- it consists of non-zero digits;
- it is divisible by 4;
- any number obtained from the number $N$ by permuting its digits is divisible by 4.

How many interesting numbers exist?
Answer: 128.

Solution. We will use the divisibility rule for 4: a number is divisible by 4 if and only if the number formed by its last two digits is divisible by 4.

In an interesting number, the digits can be rearranged in any way, and the divisibility by 4 should remain unchanged. This implies that there are no odd digits in its representation (otherwise, any of them could be placed at the end, and the resulting number would not be divisible by 4).

Let's consider which two non-zero even digits an interesting number can end with. As we remember, the two-digit number formed by these digits must be divisible by 4.

- 24 - this option does not work, because when the last two digits are swapped, the number will end in 42, and 42 is not divisible by 4;
- 28 - this option does not work, because when the last two digits are swapped, the number will end in 82, and 82 is not divisible by 4;
- 44 - this option works;
- 48 - this option works;
- 64 - this option does not work, because when the last two digits are swapped, the number will end in 46, and 46 is not divisible by 4;
- 68 - this option does not work, because when the last two digits are swapped, the number will end in 86, and 86 is not divisible by 4;
- 84 - this option works;
- 88 - this option works.

From this, it follows that an interesting number can consist only of the digits 4 and 8. It is also clear that any number whose digits are all 4 or 8 is interesting. Thus, each digit of a seven-digit interesting number can take exactly 2 values, and there are exactly $2^{7}=128$ such numbers.