R. Stanley formulated a partition function t(n) which counts the number of partitions π for which the number of odd parts of π is congruent to the number of odd parts in the conjugate partition π' (mod 4). In light of G. E. Andrews' work on this subject, it is natural to ask for relationships between t(n) and the usual partition function p(n). In particular, Andrews showed that the (mod 5) Ramanujan congruence for p(n) also holds for t(n). In this paper we extend his observation by showing that there are infinitely many arithmetic progressions An + B such that for all n ≥ 0, t(An + B) ≡ p(An + B) = 0 (mod l j ) whenever l ≥ 5 is prime and j > 1.