An interplay between ergodic theory and combinatorics