Hint for the pattern.
As we can see the pattern is, for n>=4:\n\n    4=2+2;\n    5=2+3;\n    6=3+3;\n    7=2+2+3;\n    8=2+3+3;\n    9=3+3+3;\n    10=2+2+3+3;\n    11=2+3+3+3;\n    1
As we can see the pattern is, for n>=4:\n\n    4=2+2;\n    5=2+3;\n    6=3+3;\n    7=2+2+3;\n    8=2+3+3;\n    9=3+3+3;\n    10=2+2+3+3;\n    11=2+3+3+3;\n    12=3+3+3+3;\n    13=2+2+3+3+3;\n    14=2+3+3+3+3;\n    15=3+3+3+3+3;\n\nand so on.\n\nIf `n == 3 * k` then the answer is `3 ^ k`; \n\nIf `3*(k-1) < n <= 3*k`, replace some `3` with `2`'s.
[]