1. ## Interesting set/divisibility/counting question

A set S, with only a finite number of integers as members, has the property that the average of any 3 of its members is not an integer. What is the maximum number of elements that S may have?

2. Hello, Chris11!

There is no formula for this problem (that I know of).
I had to reason it out . . .

A set $S$ with only a finite number of integers as members,
has the property that the average of any 3 of its members is not an integer.
What is the maximum number of elements that $S$ may have?

There are three types of integers:

. . (1) A multiple of 3: . $3a$
. . (2) One more than a multiple of 3: . $3b+1$
. . (3) One less than a multiple of 3: . $3c-1$

We must not have 3 of type (1), or 3 of type (2), or 3 of type (3).
. . Their averages would be integers.

We can have at most two of one type.

We must not have one of each type.
. . Their average would be an integer.

We can have at most two types of numbers.

Hence, we can have (at most) two each of two types of numbers.

Therefore, set $S$ can have a maximum of 4 elements.

3. I believe the answer is 4.

If you look at the integers modulo 3, you have three possibilities: 0, 1, and -1. The set S cannot contain one of the following:

1) 0, 1, and -1
2) At least three repeating elements.

If the order of S is at least five, it's going to have one of the two.

4. Yep, that's exactly what I did, Black. Soroban, your solution is interesting in that it introduces notation that I didn't think of. Now try it in the general case!

5. Originally Posted by Chris11
Yep, that's exactly what I did, Black. Soroban, your solution is interesting in that it introduces notation that I didn't think of.
Now try it in the general case!
If the equivalence classes modulo three are $[0],~[1],~\&~[2]$ note that one of the three must empty. WHY?
None of the three can have three members.

What do you mean by the general case?

6. Let S be a subset of the integers with the property that the average of any n of its members is not an integer. What is the maximum number of elements that S may have?