Printing a K-ary tree stored in level-order in an array
Your biggest performance problem is the repeated string concatenation using the + operator.  Since Java strings are immutable, every += operation requires allocating a new string and copying the previous contents.  Use a StringBuilder instead.

Math.pow() should be avoided, since it performs floating-point arithmetic, and this task should be accomplished using just integer arithmetic.  Why not keep track of the desired width of the current row, and use an inner loop to print each row?

public static void main(String[] args) {
    int k = 3;
    Integer[] arrInt = {0,1,2,3,null,null,null,7,8,9,10,11,12};

    StringBuilder ans = new StringBuilder();
    for (int i = 0, width = 1; i &lt; arrInt.length; i += width, width *= k) {
        for (int j = i, end = Math.min(i + width, arrInt.length); j &lt; end; ++j) {
            ans.append((j &gt; i) ? " " : (j &gt; 0) ? "\n" : "")
               .append(arrInt[j]);
        }
    }
    System.out.println(ans);
}