4. There is a basket of apples. After dividing them into three equal parts, there are 2 apples left. Take out two of these parts, and divide them into three equal parts again, with 2 apples left. Then take out two of these parts again, and divide these two parts into three equal parts, with 2 apples left. How many apples are there in the basket at least?

将上面的文本翻译成英文，请保留源文本的换行和格式，直接输出翻译结果。
4. 【Solution】If 4 apples are added, then the first division will be exactly into three equal parts, and each part will have 2 more apples than before. The second and third divisions are also the same. The third division results in each part having 2 more apples than before, and since the total number of apples in the two parts from the second division is even, the number of apples in each part of the third division is even, so each part of the third division must have at least 4 apples. Each part of the second division must have at least $4 \times 3 \div 2=6$ (apples), and each part of the first division must have at least $6 \times 3 \div 2=9$ (apples). Therefore, the basket of apples must have at least $9 \times 3-4=23$ (apples).

【Another Solution】If 4 apples are added, then the first division will be exactly into three equal parts (each part having 2 more apples than before), the second division will take two parts (4 more apples than the original two parts) and will also be exactly into three equal parts (each part having 2 more apples than before), and the third division will also take two parts (4 more apples than the original two parts) and will be exactly into three equal parts. Since the total number of apples in the last division is even (because it takes two parts to divide), each part must also be even, and since each part has 2 more apples than before, each part must have at least 4 apples. Therefore, each part of the previous division must have at least $4 \times \frac{3}{2}=$ 6 (apples), and each part of the division before that must have at least $6 \times \frac{3}{2}=9$ (apples). Initially, there must be $9 \times 3=27$ (apples), so the basket of apples must have at least $27-4=23$ (apples).