GG.18 200---07 divisible by 27 and indivisible by 81

Integers of which top is 2, end is 7 and all interval numbers are 0 such as 207, 2007, 20007, ‥ ‥ ‥, are divided by 27 and 81.

Find the smallest number among such numbers which is divisible by 27 and indivisible by 81.

Answer
20000007

Solution
81 and 27 are factorized into prime factor respectively.
27 = 3 × 3 × 3
81 = 3 × 3 × 3 × 3.
207,2007 and 20007 are factorized into prime factor respectively.
207 = 3 × 3 × 23 · · · ①
2007 = 3 × 3 × 223 · · · ②
20007 = 3 × 3 × 2223 · · · ③
Thus, in order for 200 .. 07 is divisible by 27 and is indivisible by 81, it is understood that in 200 · · · 07 = 3 × 3 × A, A is divisible by 3 and indivisible by 9.
As can be seen in ① ~ ③ above, A is such a number as 22 ... 3, it is investigated in order from smaller one as follows.

It is found that 2222223 is divisible by 3 and indivisible by 9.
Number to be obtained is 3 × 3 × 2222223.
If you look at the ① ~ ③, the number of 0 between 2 and 7 is same as the number of 2.
Therefore this number is 20000007.