4. Given the set $=\left\{x \mid x=a_{0}+a_{1} \times 8+a_{2} \times 8^{2}+a_{3} \times 8^{3}\right\}$, where $a_{i} \in\{0,1,2,3,4,5,6,7\}, i=0,1,2,3$

and $a_{3} \neq 0$, if positive integers $m, n \in A$, satisfy $m+n=2018$, and $m>n$, then the number of positive integers $m$ that meet the condition is
$\qquad$
Given: $\because m>n, m+n=2018, \therefore m \geq 1010$
$$
\because n \geq 1 \times 8^{3}=512, \quad m \leq 2018-512=1506, \quad \therefore 1010 \leq m \leq 1506
$$

The number of $m$ that satisfy the condition is $1506-1010+1=497$