Generate programs that print n times their length
JavaScript (ES6), 38 bytes

n=&gt;`(x="${n}")=&gt;(x+1/7+1e9).repeat(x)`


Demo



let f =

n=&gt;`(x="${n}")=&gt;(x+1/7+1e9).repeat(x)`

function update() {
  let n = I.value,
      func = f(n),
      res = eval(func)();
  O.innerText =
    'n = ' + n + '\n\n' +
    'Function (' + func.length + ' bytes):\n' + func + '\n\n' +
    'Function output (' + res.length + ' bytes):\n' + res;
}
update()
&lt;input type=range id=I min=0 max=100 oninput="update()"&gt;
&lt;pre id=O&gt;