Let a1, a2, ... be a sequence of numbers, each either 1 or −1. Show that if
3a1+32a2+...=qp for integers p and q such that 3 does not divide q, then the sequence a1, a2, ... is periodic; that is, there is some positive integer n such that ai=an+i for i=1, 2,.... number theoryPeriodic sequenceperiodic