mathematics behind xkcd 688