2023 AIME II Problem 15

For each positive integer n let a_n be the least positive integer multiple of 23 such that a_n \equiv 1\left(\bmod 2^n\right). Find the number of positive integers n less than or equal to 1000 that satisfy a_n=a_{n+1}.