4. Let the set $M=\{1,2, \cdots, 2020\}, A \subseteq M$, and for any element $x$ in set $A$, $4x \notin A$. Then the maximum number of elements in set $A$ is $\qquad$
4. 1616.

First, construct 404 sets $\{k, 4k\}$, where,
$$
k=1; 8,9, \cdots, 31; 127,128, \cdots, 505 \text{. }
$$

Second, each number $x$ in set $M$ that is not among the aforementioned 808 numbers forms a set $\{x\}$, totaling 1212.
Thus, there are $404+1212=1616$ sets.
By the pigeonhole principle, if set $A$ contains more than 1616 numbers, then there must be two numbers from the same set among the aforementioned sets. Therefore, there exist $x, 4x \in A$, which is a contradiction.

Hence, set $A$ contains at most 1616 numbers, and a set that satisfies the condition is
$$
\begin{aligned}
A= & \{2,3, \cdots, 7,32,33, \cdots, 126,506,507, \\
& \cdots, 2020\} .
\end{aligned}
$$