5.2 if n < 3, version 1 is the fastest. if n < 8, version 2 is the fastest. else, it's version 3 is the fastest.