Gene Kelly was the last one taped. Roger Moore's was the eigth one taped in the season.
Also in the Gene Kelly episode, the crew of Pigs in Space reached the End of the Universe, at which point they are given the meaning and purpose of life (which they miss in favor of dinner- swill stroganof). The Announcer, however, hears it. And while I'm on the subject, another 'last episode' unique quality is that we actually see the announcer! He falls down in Vet's Hospital (as per Beauregard's belief that before the world ends, "there'll be a sign. Something will happen here that's never happened before!") and later Pigs in Space.
David "Gorgon Heap" Ebersole