Factorization and recursion relations of the matching and characteristic polynomials of periodic polymer networks