For instance can a book based on (or about) ancient mythologies be advertised as 'for fans of the Percy Jackson books'?
This is legal
Trademark infringement occurs when confusion would be created by the use of the trademark - this is not the case here. It seems to be a type of comparability fair use.
Furthermore is the book went on to compare and contrast the Percy Jackson use of mythological figures with their historical or other fictional representations this would be copyright fair use as literary criticism.