A sequence (xn) (n = 1, 2, . . .) is periodic if xn+p = xn for some p and all n. Periodic sequences arise naturally in geometry and arithmetic in the study of mosaic patterns [4], continued fractions and frieze patterns [3; 5]. Some digital oscillators and tone generators also generate periodic sequences. In these cases one computes the period p of the sequence in question. On the other hand, in pseudo random sequences and cryptography [8] it is required to recursively generate sequences of large periods.