##Java 7, 86 bytes No fancy folds or matrices, just a good ol' fashioned `for` loop :) int[]o(int[]a,int l){int i=0,o[]=new int[l];for(;i<a.length;)o[i%l]+=a[i++];return o;} [Try it on Ideone][1] Lined: int[]o(int[]a,int l){ int i=0, o[]=new int[l]; for(;i<a.length;) o[i%l]+=a[i++]; return o; } [1]: https://ideone.com/j3MjBh