MathDB
2021 USMCA National Championship #30

Source:

May 9, 2021

Problem Statement

I start with a sequence of letters A1A2A2021A1A2A2021A1A2A2021A_1 A_2 \cdots A_{2021} A_1 A_2 \cdots A_{2021} A_1 A_2 \cdots A_{2021}. I go through i=1,2,3,,6062i = 1, 2, 3, \cdots, 6062 in order, and for each ii, I can choose to swap letters ii and i+1i+1. Let NN be the number of distinct strings I can end up with. What is the remainder when NN is divided by 20172017?