On a class of relatively prime sequences