Skip to main content
OlympiadHQ

Browse · MathNet

Print

South African Mathematics Olympiad

South Africa number theory

Problem

A new sequence is formed by deleting numbers from the sequence such that the sum of any two numbers of the new sequence is never a multiple of seven. What is the maximum length of the new sequence?
Solution
Group the numbers into groups according to their remainders upon division by : the groups are Note that if a number from a group that leaves remainder is not deleted, then all the numbers from the group that leaves remainder must be deleted, otherwise two numbers will sum to a multiple of . In particular, only one number from the last group above may be selected. Note also that if one number from a group (besides the last one) is selected, we may select all numbers in that group, since they all leave the same remainder when divided by . The first three groups contain numbers each, while the last four contain numbers each. If we select the first three groups, we may not select any number in the next three groups, and finally we can select one number from the last group. This yields numbers.
Final answer
217

Techniques

Modular ArithmeticColoring schemes, extremal arguments