The chromatic polynomial of a graph \( G \), \( P(G; \lambda) \), is the polynomial in \( \lambda \) which counts the number of distinct proper vertex \( \lambda \)-colorings of \( G \), given \( \lambda \) colors. We compute \( P(C_4 \times P_n; \lambda) \) and \( P(C_5 \times P_n; \lambda) \) in matrix form and will find the generating function for each of these sequences.