A number less than one million is known to be such that diminishing it by 3 makes it divisible by 7.

From the number diminished by 3, we subtract the seventh part. We then obtain a number that also becomes divisible by 7 after 3 is subtracted from it.

From this number we derive another in the same way, namely by subtracting a seventh part from the number diminished by 3.

This time, too, a number results that is divisible by 7 after subtracting 3.

This occurs four more times, so that, in all, it happens seven times over, that a number is divisible by 7 after subtracting 3.

Find this number.