Every constant function is 1-periodic. The sequence 1,2,1,2,1,2\dots is periodic with least period 2. The sequence of digits in the
decimal expansion of 1/7 is periodic with period 6: :\frac{1}{7} = 0.142857\,142857\,142857\,\ldots More generally, the sequence of digits in the decimal expansion of any
rational number is eventually periodic (see below). The sequence of powers of −1 is periodic with period two: :-1,1,-1,1,-1,1,\ldots More generally, the sequence of powers of any
root of unity is periodic. The same holds true for the powers of any element of finite
order in a
group. Every periodic sequence of numbers can be written as a
polynomial p(x), evaluated at the powers of a root of unity: a_i=p(z^i) where z is a root of unity whose order is the period of the sequence. A
periodic point for a function is a point whose
orbit :x,\, f(x),\, f(f(x)),\, f^3(x),\, f^4(x),\, \ldots is a periodic sequence. Here, f^n(x) means the
composition of applied to . Periodic points are important in the theory of
dynamical systems. Every function from a
finite set to itself has a periodic point;
cycle detection is the algorithmic problem of finding such a point. ==Partial sums and products ==