periodicity
Some chains have a built-in rhythm. Picture hopping between the two banks of a river, crossing every single step: you are on the left bank at even times and the right bank at odd times, like clockwork. You can return to your starting bank only after an even number of steps. That forced beat is periodicity, and it can prevent a chain from ever settling into a steady distribution.
The period of a state i is the greatest common divisor of all the step-counts n at which return is possible — that is, the gcd of every n with P^(n)(i, i) greater than 0. If that gcd is 1, the state is aperiodic: returns can happen at irregular, mutually-prime times, with no rigid cycle. If the gcd is d greater than 1, returns are only possible at multiples of d, and the chain is periodic with period d. Within a communicating class all states share the same period, so periodicity, like recurrence, is a class property.
Periodicity is the last obstacle to convergence. An irreducible, positive recurrent, APERIODIC chain converges to its stationary distribution from any start — that is the fundamental limit theorem. But a periodic chain, even with a perfectly good stationary distribution, never converges in the ordinary sense: it keeps sloshing between phases forever, so P^(n) oscillates rather than settling. A handy guarantee of aperiodicity is any self-loop, P(i, i) greater than 0 — even one state that can stay put breaks the rigid beat.
Two states with P having rows (0, 1) and (1, 0) (always switch). Return to state 1 is possible only at n = 2, 4, 6, ..., so the period is gcd(2, 4, 6, ...) = 2 — it is periodic. Its stationary distribution is (1/2, 1/2), but P^n flips between the identity (rows (1, 0) and (0, 1)) and the swap (rows (0, 1) and (1, 0)) forever and never converges. Make P have rows (0.1, 0.9) and (0.9, 0.1) and the self-loops force aperiodicity, so now it does converge to (1/2, 1/2).
A periodic chain has a stationary distribution but its powers oscillate; aperiodicity is what allows convergence.
A periodic chain can still HAVE a stationary distribution and obey the ergodic theorem for time averages — periodicity blocks the pointwise convergence of P^(n), not the existence of equilibrium or long-run frequencies.