That 30 is the output of fprintf, exactly as you have coded it. The fprintf documentation clearly describes its output as " nbytes = fprintf(__) returns the number of bytes that fprintf writes". If you don't want the output of fprintf (i.e. the number of bytes), then don't use it:
function beautyofmath(i)
...
fprintf('%d x 8 + %d = %d\n', j(i, 1), j(i, 2), j(i, 3));
end
However it seems you are confused about the difference between a function output and the text that fprintf is printing in your command window. You function currently outputs the value 30 (the bytes value from fprintf), and prints those lines to your command window. So although you write that "and it outputs" those lines of text, it actually prints those lines and outputs the value 30.