In the show: We see Maester Aemon dying of that most rare of things in Westeros: natural causes. Hes tended to by Gilly in his chambers at Castle Black, reliving tales of his brother Aegon (or Egg) in his final moments. Hes then given a proper funeral pyre, presided over by Sam. Later, Sam loses his virginity to Gilly, after protecting her from an attack by brothers of the NIghts Watch. In the books: Aemon leaves The Wall with Sam and Gilly as they head for Oldtown, where Sam has been sent by Jon in order to train to become a Maester for the Night's Watch, and his death takes place on the journey. Sam and Gilly have sex below decks afterwards. Why the change? The show hasnt yet got to the point of sending Sam away to the Citadel, although it does keep pointing in that direction, so theres been no reason for him and Gilly to leave The Wall. It also means that Aemon gets the send off that his portrayal by Peter Vaughan deserves, without drastic changes to the book. It also adds to the feeling of Sam losing all his friends, pointed out by Alliser Thorne, which may end up being a factor in whether or not he eventually goes to Oldtown.