Join N copies of a snippet to produce N^2 characters

TECO, 4 bytes

V1\V

V prints the contents of the current line in the text buffer. 1\ inserts the string representation of the number 1 at the current position.

So on the Nth iteration of the program, the first V will output N - 1 copies of the character 1, then add another 1 to the text, then output N 1s.


Brainfuck, 17 16 bytes

[>+>-..+<<-]-.>+

You can test it here. Just use the fact that n2+2n+1=(n+1)2.


Brainfuck, 11

I saw the first Brainfuck answer and thought it's way too long :)

[.<]>[.>]+.

The output may be easier to see if you replace the plus with a lot more pluses.

On the Nth iteration, each loop outputs N - 1 copies of the character with ASCII value 1, and then one more with +..