6. Pompous Vova has an iPhone XXX, and on that iPhone there is a voice-command calculator: "Multiply my number by two and subtract two from the result," "Be so kind as to multiply my number by three and then add four," and finally, "Add seven to my number!" The iPhone knows that Vova initially had the number 1. How many four-digit numbers could the iPhone XXX theoretically obtain by obediently following Vova's commands?

## Solution:
Answer: 9000 (or 18000, if negative numbers are considered).

We will prove that we can obtain all four-digit numbers. Note that the command +7 allows us to obtain from the current number all larger numbers with the same remainder when divided by seven. Therefore, it is sufficient to use the first two buttons to obtain a representative of each of the seven remainders $(0,1, \ldots, 6)$.

Initially, we have 1. From 1, we can obtain the number $7 (3 \cdot 1 + 4 = 7)$ - a representative of the remainder 0. From the number 7, we can obtain representatives of the remainder $5 (2 \cdot 7 - 2 = 12)$ and the remainder $4 (3 \cdot 7 + 4 = 25)$. From the number 25, we can obtain a representative of the remainder $6 (2 \cdot 25 - 2 = 48)$ and the remainder $2 (3 \cdot 25 + 4 = 79)$. From the number 79, we can obtain a representative of the remainder $3 (3 \cdot 79 + 4 = 241)$. Thus, we have obtained representatives of all remainders, from which we can obtain all four-digit numbers using the +7 button. And there are 9000 four-digit numbers in total.

Remark. In the problem, natural four-digit numbers were implied. However, a similar solution works for negative numbers, except that we need to obtain a multi-digit negative number with a remainder of 1 when divided by 7 using repeated application of the operation $2 \cdot x - 2$ (the remainders alternate $1-0-5-1$).