From f | (Xd - 1) and f(A) = 0 we conclude Ad = I. The transition matrix for d shifts is Ad. Thus, after d shifts, we recover the initial situation.
If e is also a natural number such that after e
shifts, we recover the initial situation, then so is gcd(d,e).
(For, if Ae = Ad = I,
then Aae+bd = I for any two integers a, b.
Of course, such a, b can be found using the
extended Euclidean algorithm.)
Therefore, the period, being the minimal such number, is a divisor of d.