Find all real numbers $a,$ which satisfy the following condition:

For every sequence  $a_1,a_2,a_3,\ldots$ of pairwise different positive integers, for which the inequality $a_n\leq an$ holds for every positive integer $n,$ there exist infinitely many numbers in the sequence with sum of their digits in base $4038,$ which is not divisible by $2019.$
1. **Define Good and Bad Numbers:**
   We define a positive integer as "good" if its sum of digits in base 4038 is divisible by 2019, and "bad" otherwise.

2. **Intervals \( I_k \):**
   Consider the intervals \( I_k = [4038k, 4038k + 4037] \). Each interval \( I_k \) contains 4038 consecutive integers.

3. **Good Numbers in \( I_1 \):**
   The interval \( I_1 = [4038, 8075] \) contains exactly one good number, which is 2019.

4. **Claim 1:**
   For all \( k \geq 1 \), the interval \( I_k \) contains exactly 2 good numbers.

   **Proof of Claim 1:**
   Let \( s(n) \) be the sum of digits of an integer \( n \) in base 4038. Suppose \( a = 4038k + b \) is an element of \( I_k \). Then:
   \[
   s(a) = s(4038k + b) = s(k) + s(b) = S + b
   \]
   where \( S = s(k) \). For \( a \) to be good, we need:
   \[
   S + b \equiv 0 \pmod{2019}
   \]
   This implies:
   \[
   b \equiv -S \pmod{2019}
   \]
   Since \( 0 \leq b \leq 4037 \), there are exactly two possible values for \( b \) that satisfy this condition. Therefore, each interval \( I_k \) contains exactly 2 good numbers. \(\blacksquare\)

5. **Constructing a Counter-Example for \( a = 2019 \):**
   Consider the sequence:
   \[
   1, 2, 2019, x_2, y_2, x_3, y_3, \ldots
   \]
   where \( x_k \) and \( y_k \) are the two good numbers in the interval \( I_k \). This sequence satisfies \( a_n \leq 2019n \) and contains infinitely many good numbers.

6. **Suppose \( a < 2019 \):**
   Let \( f(n) \) be the number of good numbers less than or equal to \( n \), and let \( B(n) \) be the number of bad numbers among \( a_1, a_2, \ldots, a_n \).

7. **Claim 2:**
   For every positive integer \( k \geq 2 \), we have:
   \[
   f(4038k) < 2k
   \]

   **Proof of Claim 2:**
   This follows directly from Claim 1, as each interval \( I_k \) contains exactly 2 good numbers. \(\blacksquare\)

8. **Bounding the Number of Good Numbers:**
   Since \( a_n \leq an \), there are at most \( f(an) \) good numbers among \( a_1, a_2, \ldots, a_n \). Let \( k \) be the integer such that \( 4038(k-1) \leq an \leq 4038k \). Then:
   \[
   B(n) \geq n - f(an) \geq n - f(4038k) > n - 2k
   \]
   Since \( 4038(k-1) \leq an \leq 4038k \), we have:
   \[
   k \leq \frac{an}{4038} + 1
   \]
   Therefore:
   \[
   B(n) > n - 2\left(\frac{an}{4038} + 1\right) = n - \frac{2an}{4038} - 2
   \]
   Simplifying further:
   \[
   B(n) > n\left(1 - \frac{2a}{4038}\right) - 2
   \]
   Since \( a < 2019 \), we have \( 1 - \frac{2a}{4038} > 0 \). Thus, \( B(n) \) is unbounded, which completes the proof.

The final answer is \( \boxed{ a < 2019 } \)