The last episode of Sonic X is Episode 78, titled "So Long Sonic".
It closes out the series on a farewell note, which fits the title and gives the show a definitive ending rather than trailing off.