A finite sequence of four-digit integers has the property that the hundreds, tens, and units digits of each term are, respectively, the thousands, hundreds, and tens digits of the next term, and the hundreds, tens, and units digits of the last term are, respectively, the thousands, hundreds, and tens digits of the first term. For example, such a sequence might begin with the terms , , and and end with the term . Let be the sum of all the terms in the sequence. What is the largest prime factor that always divides ?
11
37
41
101
271