Recursive Java Solution, 11 lines
```java\n public String digitSum(String s, int k){\n        if(s.length() <= k)\n            return s;\n        StringBuilder r = new StringBuilder();\n        
```java\n public String digitSum(String s, int k){\n        if(s.length() <= k)\n            return s;\n        StringBuilder r = new StringBuilder();\n        for(int i = 1, sum = 0; i <= s.length(); i++){\n            sum += s.charAt(i - 1) - \'0\';\n            if(i % k == 0 || i == s.length()){\n                r.append(sum);\n                sum = 0;\n            }\n        }\n        return digitSum(r.toString(), k);\n    }
['Java']