A seven digit positive

**octal** integer

**X** is constituted by arranging the nonzero octal digits 1-7 in some order, so that:

- The octal number formed by the first two digits is divisible by 2.

- The octal number formed by the first three digits is divisible by 3.

- The octal number formed by the first four digits is divisible by 4.
- and, so on up to seven digits...

Determine all possible value(s) that

**X** can assume.

By the way, all permutations of the digits 1 through 7 form a base 8 number that is divisible by 7. This is directly analogous to the way that any permutation of the digits 1 through 9 (or 0 through 9) form a base 10 number that is divisible by 9.

This is because 8^n mod 7 = 1 for all integral n >= 0. To find the remainder mod 7 of a base 8 number, just sum its digits and divide that the sum by 7. 1 + 2 + 3 + 4 + 5 + 6 + 7 = 7*4 = 0 mod 7.