1089. Given an infinite arithmetic progression $3 ; 16 ; 29 ; 42 ; \ldots$. Find:

a) the smallest term of the sequence that can be written using only sevens;

b) all such terms.
$\triangle$ a) To find the smallest term of the sequence with this property, one needs to divide the number, written with sevens, by the difference of the progression 13 until the first time the remainder is 3. Such a number is 7777:

$$
7777=13 \cdot 598+3
$$

b) Let's find the next term of the sequence with the same property in a similar manner. It is written with 10 sevens:

$$
7777777777=13 \cdot 598290598+3
$$

Obviously, the next terms with the same property are written with $16, 22, 28, \ldots$ sevens.

Answer: a) $7777$; b) $777 \ldots 7$, where the number of sevens is $6k+4(k=0,1,2, \ldots)$.