To solve the problem, we need to find all integers n such that an n×n table can be filled with the letters I,M,O while satisfying the given conditions:
1. Each row and each column contains exactly one-third of I's, M's, and O's.
2. For any diagonal whose length is a multiple of three, one-third of its entries must be I's, one-third M's, and one-third O's.
### Analysis
1. Row and Column Condition:
- Each row and column must have each letter exactly one-third of the time.
- Therefore, n must be divisible by 3, since each character should appear 3n times.
2. Diagonal Condition:
- We have two types of diagonals:
- Type 1: All cells (i,j) for which i+j is constant.
- Type 2: All cells (i,j) for which i−j is constant.
- For diagonals whose length is a multiple of 3, each letter must appear one-third of the time.
### Solution
To satisfy the diagonal condition for both types, each diagonal must be able to be evenly divided into three parts. The longest diagonals occur when i+j=n and i−j=1−n or vice versa. Each of these diagonals has length n.
- Therefore, n must also be divisible by 3 for the diagonal condition.
From both conditions, n must be divisible by 3.
### Verification
If n=3k, where k is a positive integer:
- Rows and columns can be filled with each of I,M,O repeated k times.
- Both types of diagonals of lengths that are multiples of 3 will have their contents divided equally among I,M,O.
Thus, n should be a multiple of 9, as diagonals require full sections of characteristic grouping.
⇒ Conclusion: The requirement is satisfied for n=9k with k being a positive integer.
Therefore, the integers n for which the condition holds are:
9k for any positive integer k.