Let \(c\phi _{k,h}(n)\) denote the number of F-partitions of n that allow up to h repetitions of k copies of a nonnegative integer in a row. In this paper, we present generating functions for \(c\phi _{2,2}(n)\) and \(c\phi _{2,3}(n)\) in terms of q-products, and obtain several congruences modulo powers of 2 and 3 for these functions. For example, we find that for nonnegative integers n and k, \(c\phi _{2,3}\left( 2\times 5^{2k+2}n+3\times \frac{5^{2k+2}-1}{4}+1\right) \equiv c\phi _{2,3}(2n+1)\pmod {8}.\) We use properties of Ramanujan’s theta functions and integer matrix exact covering systems to arrive at our results.