A line Python solution
    def integerBreak(self, n):\n            return ((n % 3 + 3 + (n%3 == 2))*3**(n/3-1)) if (n>3) else (n-1)
        def integerBreak(self, n):\n            return ((n % 3 + 3 + (n%3 == 2))*3**(n/3-1)) if (n>3) else (n-1)
[]