Problem

Source: All Russian Olympiad 2017,Day1,grade 11,P4

Tags: combinatorics



Magicman and his helper want to do some magic trick. They have special card desk. Back of all cards is common color and face is one of $2017$ colors. Magic trick: magicman go away from scene. Then viewers should put on the table $n>1$ cards in the row face up. Helper looks at these cards, then he turn all cards face down, except one, without changing order in row. Then magicman returns on the scene, looks at cards, then show on the one card, that lays face down and names it face color. What is minimal $n$ such that magicman and his helper can has strategy to make magic trick successfully?