User blog comment:IAmNotATRex/Array-Based Extension to the FGH/@comment-35470197-20180823033022

> If I made a mistake in my logic or a typo anywhere, please let me know.

Maybe \([a_1,a_2,\ldots,a_{k−1},a_{k−2}]\) is a typo of \([a_1,a_2,\ldots,a_{k−1},a_k]\) :D