pseudosmarandache function