The chromatic polynomial of a graph G, P(G;λ), is the polynomial in λ which counts the number of distinct proper vertex λ-colorings of G, given λ colors. We compute P(C4×Pn;λ) and P(C5×Pn;λ) in matrix form and will find the generating function for each of these sequences.