A number appears on a computer screen. We know that if $x$ appears on the screen, the number $x^{2}-2 x+1$ appears right after. If the first number to appear is 2, what is the 2020-th number to appear
Let's start by looking at the first values displayed by the computer:

- The first number is 2.
- The second number is $2^{2}-2 \times 2+1=1$
- The third number is $1^{2}-2 \times 1+1=1-2+1=0$
- The fourth number is $0^{2}-2 \times 0+1=1$
- The fifth number is $1^{2}-2 \times 1+1=1-2+1=0$
- The sixth number is $0^{2}-2 \times 0+1=1$
- The seventh number is $1^{2}-2 \times 1+1=1-2+1=0$

We see that the numbers that appear are in the order $2,1,0,1,0,1,0$. Since after a 0 there is always $0^{2}-2 \times 0+1=1$ and after a 1 there is always $1^{2}-2 \times 1+1=1-2+1=0$, we will have an alternation of 0 and 1. Since 1 appears in second place, all the numbers appearing at an even rank will be 1, so the 2020th number is 1.

Comment: We congratulate the students who successfully completed this exercise. The few errors observed were mainly calculation errors or rank shifts of the numbers displayed. For example, some students considered that the rank of the first number to appear on the screen was rank 0, while it is rank 1. To avoid this mistake, some students used a table, which was greatly appreciated. We invite students to be vigilant about this kind of error, which has sometimes caused a lot of damage, and not to rush through the exercises, always checking the reasoning used.