For integers l>0 and m⩾0, we introduce the numbers Sl(m)(n)=k1+⋯+kl=nk1,…,kl∈N∑(k1,…,kln)m (n=0,1,2,…), and prove that for any prime p not dividing l+1 we have the congruence n=1∑p−1nm−1(−1)mnSl(m)(n)≡0(modp). We also obtain a q-analogue of this result. For the Domb numbers given by D(n)=k=0∑n(kn)2(k2k)(n−k2(n−k))=S4(2)(n) (n=0,1,2,…), we confirm a previous conjecture which states that n=1∑p−1nD(n)≡(3p)52pBp−2(31)(modp2) for any prime p, where (3p) is the Legendre symbol, and Bp−2(x) is the Bernoulli polynomial of degree p−2.