2022 Pan-American Girls' Math Olympiad
Part of PAGMO
Subcontests
(6)Two girls play the longest game ever
Ana and Bety play a game alternating turns. Initially, Ana chooses an odd possitive integer and composite n such that 2j<n<2j+1 with 2<j. In her first turn Bety chooses an odd composite integer n1 such that
n1≤2(n−1)n−11n+2n+⋯+(n−1)n.
Then, on her other turn, Ana chooses a prime number p1 that divides n1. If the prime that Ana chooses is 3, 5 or 7, the Ana wins; otherwise Bety chooses an odd composite positive integer n2 such that n2≤2(p1−1)p1−11p1+2p1+⋯+(p1−1)p1.
After that, on her turn, Ana chooses a prime p2 that divides n2,, if p2 is 3, 5, or 7, Ana wins, otherwise the process repeats. Also, Ana wins if at any time Bety cannot choose an odd composite positive integer in the corresponding range. Bety wins if she manages to play at least j−1 turns. Find which of the two players has a winning strategy.