There's a long standing fan argument of the correct way to watch The Melancholy of Haruhi Suzumiya . When the first anime season premiered on TV, the episodes were not shown in chronological order. The anime was then released on home video but with the episodes rearranged sequentially. The original episode order added an element of mystery to a series that already includes ESPers, time-travelers, and aliens. Given the supernatural events taking place left and right, there's an argument to be made about which episode order is more "correct."

A poster on 4chan's science message board posited a simple question in 2011, "which way is the most efficient way to watch every possible order of The Melancholy on Haruhi Suzumiya's 14 episodes?" No one expected the answer to have real-life applications outside of anime fandom, much less help crack a conundrum that's stumped mathematicians for the last 25 years.

Computer scientist and mathematician Robin Houston discovered the question on the Math and Science wikia page and tweeted about it on Tuesday. An anonymous 4chan poster had offered a solution to the question and inadvertently also helped solve part of a mathematical equation focusing on superpermutations.

In terms of anime, a permutation would be any particular episode order. The TV airing of Haruhi Suzumiya is one permutation while the home video release order would be another permutation. A superpermutation, in this case, would be watching every singular permutation of The Melancholy of Haruhi Suzumiya in one go.

In the last 25 years, minds hadn't yet figured out a formula to calculate the shortest supermutation, but the Haruhi Problem has helped that search along. Greg Egan, a sci-fi writer, also made a breakthrough earlier this month by figuring out how to find the largest possible superpermutation.

Professional mathematicians have double-checked the anonymous poster's work and it checks out. Marquette University's Jay Pantone offered up a rewrite of the answer's proof for other mathematicians.

The superpermutation formula isn't completed yet, but thanks to breakthroughs by the anonymous Haruhi poster and Egan, mathematicians are much closer to hammering it out.

The Verge asked Patone to calculate the shortest possible superpermutation of The Melancholy of Haruhi Suzumiya and the result rivals Yuki's experience in the The Endless Eight. A viewer would have to watch at least 93,884,313,611 episodes to accomplish the task.

Source: The Verge (Mary Beth Griggs), The Math and Science wiki, /sci/ 4chan thread (archived)