For n≥1, let pn>1 and Dn={0,an,bn}⊂Z, where $0
μ:=δp−11{0,a1,b1}∗δp−11p−12{0,a2,b2}∗⋯∗δp−11p−12⋯p−1n{0,an,bn}∗⋯
which is generated by the sequence of integers {pn}∞n=1 and the sequence of number sets {Dn}∞n=1. The author shows that when all digit sets are uniformly bounded, μ is a spectral measure if and only if the numbers of factors 3 in the sequence {p1p2⋯pn3gcd(an,bn)}∞n=1 are different from each other and {angcd(an,bn),bngcd(an,bn)}≡{1,−1} (mod 3) for all n≥1.