text:
Calculate all the squares up to x using only addition and subtraction
The goal is to calculate all the squares up to x with addition and subtraction.
Rules:

The code must be a function which takes the total number of squares to generate, and returns an array containing all those squares.
You can not use strings, structures, multiplication, division, or built-in functions for calculating squares.
You can only use arrays, integers (whole numbers), addition, subtraction. No other operators allowed!

This is a code-golf question, so the shortest code in bytes wins!

This is essentially Most optimized algorithm for incrementing squares - or, at least, will get pretty much identical answers.

@PeterTaylor No, it's not the same, as that's for the most optimised algorithm for incrementing squares, but my question asks for only addition and subtraction.

Which is the same thing. As witness: the present answer to this question does exactly the same as the vast majority of answers to the previous question.

@PeterTaylor I might be biased, but I really don't think it's at all the same.

This question may already have answers elsewhere, but that does not make the question a duplicate of the other question.

@BlacklightShining and everyone who voted to reopen, please participate in this meta thread.

So in ⃞⃞⃞⃞⃞⃞⃞⃞⃞x - I get 9, but how do i count ◰x?  Is that one or two?

@Charles What do you mean?

@toothbrush I calculated the squares until x...  Mostly a bad joke.

Jelly, 4 bytes
+)’Ä

Try it online!
How it works
+)’Ä - Main link. Takes x on the left
 )   - For each integer 1 ≤ i ≤ x:
+    -   Yield i+i = 2i
  ’  - Decrement each
   Ä - Calculate the cumulative sum

C, 55 52 bytes
int s(int n,int*r){for(int i=0,j=-1;n--;*r++=i+=j+=2);}

simply sums odd numbers

n: number of squares to compute
r: output array for storing the results
j: takes the successive values 1, 3, 5, 7, ...
i: is incremented by j on each iteration

Edit
4 chars can be saved using the implicit int declaration (>C99), but this costs 1 char because for initializers cannot contain a declaration in >C99. Then the code becomes
s(int n,int*r){int i=0,j=-1;for(;n--;*r++=i+=j+=2);}

Usage
void main() {
    int r[20];
    s(20, r);
    for (int i = 0; i < 20 ; ++i) printf("%d\n", r[i]);
}

Output
1
4
9
16
25
36
49
(...)
361
400

that logic is Excellent! you deserve +1

APL - 10
{+\1++⍨⍳⍵}

Example usage:
{+\1++⍨⍳⍵}10
1 4 9 16 25 36 49 64 81 100

ngn APL demo

Save three bytes: +\1+⍳+⍳

GolfScript, 17 characters
{[,{.+(1$+}*]}:F;

Usage (see also examples online):
10 F     # => [0 1 4 9 16 25 36 49 64 81]

Note: * is a loop and not the multiplication operator.

OK; how does it work?

@toothbrush , takes the input and converts it to the array [0 1 ... n-1]. Then * injects the given code-block into the array. This block first doubles the current item (.+) subtracts one (() and then adds the previous result 1$+ (in other words, add 2j-1 to the previous square number). [] encloses everything in order to return a new array.

Great! I don't know GolfScript, so I wondered how it worked.

Windows Batch, 115 bytes
setlocal enabledelayedexpansion&for /l %%i in (1 1 %1)do (set a=&for /l %%j in (1 1 %%i)do set /a a+=%%i
echo.!a!)

This should be placed in a batch file instead of being run from cmd, and it outputs the list to the console. It takes the number of squares to create from the first command-line argument. For the most part it uses & instead of newlines, one is still needed however and it counts as two bytes.
It needs delayed variable expansion enabled, this can be done with cmd /v:on. Assuming it's not, an extra setlocal enabledelayedexpansion& was needed at the start (without it the script is 83 bytes).

JavaScript - 32 Characters
for(a=[k=i=0];i<x;)a[i]=k+=i+++i

Assumes a variable x exists and creates an array a of squares for values 1..x.
ECMAScript 6 - 27 Characters
b=[f=i=>b[i]=i&&i+--i+f(i)]

Calling f(x) will populate the array b with the squares for values 0..x.

I have to ask... the i+++i at the end...?

k+=i+++i is the same as k += i + (++i) which is the same as k+=i+i+1 followed by i=i+1

Oh that is genius... I've gotta implement that in my next codegolf if needed! :)

You can save one character by moving the function declaration to inside the array (e.g. b=[f=i=>b[i]=i&&i+--i+f(i)]).

Thanks - saved one character on the top answer too by moving things round to remove a semi-colon.

Haskell - 30
f n=scanl1(\x y->x+y+y-1)[1..n]

This uses the fact that (n+1)^2=n^2+2n+1

Perl, 27 bytes
sub{map{$a+=$_+$_-1}1..pop}

Math:
$$
\text{square}\left(n\right) = \begin{cases}
0                                            &  \text{for } n = 0 \\
\text{square}\left(n - 1\right) + n + n - 1  &  \text{for } n > 0
\end{cases}
$$
$$
\text{square}\left(n\right) - \text{square}\left(n - 1\right)
= n^2 - \left(n - 1\right)^2
= 2n - 1
$$
Script for calling the function to print 10 squares:
#!/usr/bin/env perl
$square = sub{map{$a+=$_+$_-1}1..pop};
use Data::Dumper;
@result = &$square(10);
print Dumper \@result;

Result:
$VAR1 = [
          1,
          4,
          9,
          16,
          25,
          36,
          49,
          64,
          81,
          100
        ];

Edits:

Anonymous function  (−2 bytes, thanks skibrianski)
pop instead of shift (−2 bytes, thanks skibiranski)

I see no reason why you need to name your sub. IOW "sub{map{$a+=$+$-1}1..shift}" seems legit to me, and saves you two chars.

@skibrianski: An anonymous function is also a function. The downside is that the calling of the function is a little more cumbersome.

Right, but that's on the caller. There are entries in other languages that define anonymous subs, so I think you're safe =)

And you can save another 2 chars by using pop() instead of shift() since there's only one argument.

@skibrianski: Right, thanks.

Julia - 33
Any square number can be written by a summation of odd numbers:
julia> f(x,s=0)=[s+=i for i=1:2:(x+x-1)];f(5)
5-element Array{Int64,1}:
  1
  4
  9
 16
 25

Hi, and welcome to CG.se! Nice, succinct answer. Never heard of Julia, but it looks intriguing.

Isn't "2x" a multiplication in Julia?  You could say x+x instead, which will cost you just one byte.

You are right (didnt notice), edited.

I'm not familiar (yet) with julia, but looked it up in the online manual at http://docs.julialang.org/en/release-0.2 and found "Numeric Literal Coefficients: To make common numeric formulas and expressions clearer, Julia allows variables to be immediately preceded by a numeric literal, implying multiplication."  So yeah, 2x is a multiplication.

C++ 99 81 78 80  78
int* f(int x){int a[x],i=1;a[0]=1;while(i<x)a[i++]=a[--i]+(++i)+i+1;return a;}

my first try in code-golf
this code is based on
a = 2 x n - 1
where n is term count and a is n th term in the following series
1,  3,  5,  9,  11,  13,  .....
sum of first 2 terms = 2 squared
sum of first 3 terms = 3 squared
and so on...

Well done! It's quite good.

Oops looks like I included iostream unnecessarily

more compression

I think you can remove the braces {} after the for loop, since there is only one statement. This can reduce your char count by 2

while(i<x) is the same size and cleaner (in my opinion) than for(;i<x;).

Standard C++ doesn't support arrays of non constant size. What compiler allows this?

If you declare arrays of non-constant size in some function other than main() then it's acceptable

VS still wouldn't let me run it.

@MukulKumar Visual Studio.

I use DEV C++ 5.5.3 editor with 'MinGW GCC 4.7.2 32' compiler  visit here to download

This code has undefined behaviour.

and returns pointer to data on stack destroyed during the return.

@V-X I know that this code is not good but dangerous but its code-golf and I programmed the code according to rules and he says to return the array so I did(consider Rule.1).

@MukulKumar I should fix my what? My answer? It doesn't use -1 as an array index... It doesn't use -1 at all, it subtracts 1 from x+y+y

@MukulKumar addition, subtraction, I'm only using those

DCPU-16 Assembly (90 bytes)
I wrote this in assembly for a fictional processor, because why not?
:l
ADD I,1
SET B,0
SET J,0
:m
ADD J,1
ADD B,I
IFL J,I
SET PC,m
SET PUSH,B
IFL I,X
SET PC,l

The number is expected to be in the X register, and other registers are expected to be 0. Results are pushed to the stack, it will break once it reaches 65535 due to the 16 bit architecture. You may want to add a SUB PC, 1 to the end to test it.
Compiled, the program should be 20 bytes (10 words).

Haskell
f x=take x [iterate (+y) 0 !! y | y<- [0..]]

This basically invents multiplication, uses it own itself, and maps it over all numbers. f 10 = [0,1,4,9,16,25,36,49,64,81]. Also f 91 = [0,1,4,9,16,25,36,49,64,81,100,121,144,169,196,225,256,289,324,361,400,441,484,529,576,625,676,729,784,841,900,961,1024,1089,1156,1225,1296,1369,1444,1521,1600,1681,1764,1849,1936,2025,2116,2209,2304,2401,2500,2601,2704,2809,2916,3025,3136,3249,3364,3481,3600,3721,3844,3969,4096,4225,4356,4489,4624,4761,4900,5041,5184,5329,5476,5625,5776,5929,6084,6241,6400,6561,6724,6889,7056,7225,7396,7569,7744,7921,8100].

Can you extend the demo to a little larger than 10?

Haskell, 34 / 23
n#m=m+n:(n+2)#(m+n)
f n=take n$1#0

or, if imports are okay:
f n=scanl1(+)[1,3..n+n]

Output:
λ> f 8
[1,4,9,16,25,36,49,64]

Javascript 47
function f(n,a){return a[n]=n?f(n-1,a)+n+n-1:0}
r=[];f(12,r);console.log(r) returns :
[0, 1, 4, 9, 16, 25, 36, 49, 64, 81, 100, 121, 144]

Great! In EcmaScript 6: f=(n,a)=>a[n]=n?f(n-1,a)+n+n-1:0.

I really can't wait for ECMAScript 6 to really enter mainstream use. That would be the perfect excuse to learn it.

The Arrow Function part of the ECMAScript 6 specification has been in FireFox since version 22.

Smalltalk, 52
f:=[:n||s|(s:=1)to:n collect:[:i|x:=s.s:=s+i+i+1.x]]

Returns a new array (i.e. does not fill or add to an existing one).
call:
f value:10
-> #(1 4 9 16 25 36 49 64 81 100)

Bash - 92 85 62 61 59 57
declare -i k=1;for((i=0;i++<$1;k+=i+i+1));do echo $k;done

Result:
$ ./squares.sh 10
1
4
9
16
25
36
49
64
81
100

Edit: I replaced the inner loop with the algorithm from @mniip's Haskell solution.

python - 39
a=0
for i in range(5):a+=i+i+1;print(a)

Replace 5 with any value. Any suggestions?

Fortran II|IV|66|77, 134 122 109 105
  SUBROUTINES(N,M)
  INTEGERM(N)
  K=0
  DO1I=1,N
  K=K+I+I-1
1 M(I)=K
  END

Edit: removed inner loop and used @mniip's Haskell algorithm instead.
Edit: Verified that the subroutine and driver are valid Fortran II and IV
Driver:
  INTEGER M(100)
  READ(5,3)N
  IF(N)5,5,1
1 IF(N-100)2,2,5
2 CALLS(N,M)
  WRITE(6,4)(M(I),I=1,N)
3 FORMAT(I3)
4 FORMAT(10I6)
  STOP
5 STOP1
  END

Result:
$ echo 20 | ./a.out
   1     4     9    16    25    36    49    64    81   100
 121   144   169   196   225   256   289   324   361   400

C# - 93
int[]s(int l){int[]w=new int[l];while(l>=0){int i=0;while(i<l){w[l-1]+=l;i++;}l--;}return w;}

When called from another method of the same class, will return the array - [1,4,9,16,25,36...],
up to lth element.

did you try removing the spaces between int[] and sq? I don't know C#, but I think it should work.

No, that wont work. First int[] is the return type of method "sq". I can reduce the method name to may be just "s" :)

I mean using int[]sq instead of int[] sq and int[]res instead of int[] res. This helps you save two chars, and I didn't get any compilation errors with that. Also you should use single character identifiers for sq and res as you suggested.

seems like there's something wrong with your answer

Indent code with 4 spaces to put it in a code-block with monospace font.

Same method as above, in APL and J:
APL: F←{+\1+V+V←¯1+⍳⍵} (17 characters) works with most APL variants (try it here)
and even less (only 14 characters) with NGN APL: F←{+\1+V+V←⍳⍵} (see here)
J: f=:+/\@(>:@+:@:i.) (18 characters)
edit: better solution in APL: F←{+\¯1+V+V←⍳⍵} (15 characters)

C# (82)
int[] s(int n){int i,p=0;var r=new int[n];while(i<n){p+=i+i+1;r[i++]=p;}return r;}

Python - 51
Here I'm defining a function as requested by the rules.
Using sum of odd numbers:
f=lambda n:[sum(range(1,i+i+3,2))for i in range(n)]

This only uses sum (a builtin which performs addition) and range (a builtin which creates arrays using addition). If you object to sum, we can do this with reduce:
def g(n):v=[];reduce(lambda x,y:v.append(x) or x+y,range(1,i+i+3,2));return v

PHP, 92 bytes
This needs to have the "short tags" option enabled, of course (to shave off 3 bytes at the start).
<? $x=100;$a=1;$r=0;while($r<=$x){if($r){echo"$r ";}for($i=0,$r=0;$i<$a;$i++){$r+=$a;}$a++;}

Output:
1 4 9 16 25 36 49 64 81 100

Forth - 48 bytes
: f 1+ 0 do i 0 i 0 do over + loop . drop loop ;

Usage:
7 f

Output:
0 1 4 9 16 25 36 49

Vyxal, 9 bytes
ɾ(n:+‹)W¦

Try it Online!
It could be just two bytes if everything is allowed

Pascal, 182 B
This is your standard odd number theorem.
$$
n^2 = \sum_{i=1}^{n}\left(2i - 1\right)
    = \sum_{i=1}^{n}\left(i + i - 1\right)
    = \sum_{i=1}^{n}\left(i\right) + \sum_{i=1}^{n}\left(i\right) - \sum_{i=1}^{n}\left(1\right)
$$
type Z=integer;L(n:Z)=array[1..n]of Z;P=^L;function Q(n:Z)=q:P;var i:Z;begin
new(q,n);q^[1]:=1;for i:=2 to n do q^[i]:=q^[i-1]+i;for i:=1 to n do begin
n:=q^[i];q^[i]:=n+n-i end end;

Disgolfed:
    type
        { This declares an Extended Pascal schema data type. }
        integerList(length: integer) = array[1‥length] of integer;
        { It is not possible to create new data types in routine signatures. }
        integerListReference = ↑integerList;

    { In Pascal functions cannot return variably‑sized values
      therefore a (constant‑sized) pointer is returned. }
    function squares(order: integer) = result: integerListReference;
        var
            { `For`‑loop counter variables must be _proper_ variables.
              It is not possible to re‑use `order` for that purpose. }
            i: integer;
        begin
            { Allocate memory and discriminate the schema data type.
              The value of `order` becomes the `length` of `integerList`. }
            new(result, order);
            { Dereference pointer and assign `1` to the first element. }
            result↑[1] ≔ 1;
            { In Pascal `for` loop limits are inclusive.
              `i` becomes `2`, `3`, …, `order − 2`, `order − 1`, and `order`.
              An empty range (that means 2 > order) is legal and
              just causes the `for`‑loop body to be never executed. }
            for i ≔ 2 to order do
            begin
                result↑[i] ≔ result↑[pred(i)] + i
            end;
            { In Pascal `for`‑loop limits are evaluate exactly once.
              Therefore a redefinition of `order` is harmless. }
            for i ≔ 1 to order do
            begin
                order ≔ result↑[i];
                result↑[i] ≔ order + order − i
            end
        end;

Note, Pascal has a built‑in square function named sqr.
It returns an integer value for an integer argument, a real value for a real argument, and – in case of Extended Pascal (ISO 10206) – a complex number in case of a complex argument.


text:
Program that creates larger versions of itself (quine-variant)
You are to write a program that will output source code that is

Larger than the original program (character wise)
Will print another program larger than itself when run (i.e. the new program is also a valid answer to this challenge) indefinitely

This is code-golf, so shortest answer wins.

@Kevin, The definition is recursive. The output should be a program whose output is larger than itself, and an answer to this question. So the output's output should be larger than the output, and the output's output's output should be even larger, etc.

Damn. Wanted to do this in Brainfuck. Took me almost half an hour to figure out that it is impossible to do so. :D

(or, well, at least almost impossible. YOu CAN create a Quine in BF, so this should be possible, too, but it'S too much work to bother with it)

I think you should clarify your rules. On one hand, any additional code output by such a program is "obviously useless"; on the other hand, all additional code in the output is "useful" in that it furthers the goal of answering this challenge.

@JohannesH. A selection of Brainfuck quines can be found here: http://esoteric.sange.fi/brainfuck/bf-source/quine/

Sorry for destroying your challenge. :^)

Naturally, such a program should be known as a quinine.

Does a program which prints its source and a comment count? For example: (bash) cat %0 & echo \#comment.

@facepalm42 Quine challenge answers are forbidden from reading their own source code, which makes comments tricky to use here.

Does this "creating of new code" have to be indefinite?

@ØrjanJohansen technically that makes this answer invalid, as the Q built-in in HQ9+ reads the source code, so if the quine definition counts here, it means 83 upvotes were waste.

GS2 (8636bd8e), 0 bytes

This prints a single newline, which prints two newlines, which prints three newlines, et cetera.
Try it online!

Isn't this technically non-competing since gs2 is newer than the challenge?

This commit predates the challenge by a month and a half. I just tested it, and it works as intended.

How is this not a loophole???

@MamaFunRoll Why would it be? This isn't different from an empty Retina program printing 1, an empty Jelly program printing 0, or an empty Stuck program printing Hello, World!.

I mean I guess...

@Dennis well it is slightly different, in that the Jelly program 0 doesn't print 00, the stuck program Hello, World! doesn't print Hello, World!Hello, World!, etc.

@Cyoce It just happens that a newline outputs another newline in GS2.

H9+ : 1 char
9

That's right. One character. Outputs the lyrics to 99 bottles of beer, which is a valid program. All the extraneous data does not count, but there are plenty of 9s in there.
The output of the outputted program is the lyrics to 99 bottles of beer 59 times.
This function gives the number of times the lyrics are outputted if you run the program n times (if my calculation is correct):
f(n) = 59n-1

@Victor Any programming languages that output on 0 chars?

But only if the output is itself a quine.

A 0 char program in a given language, given that it's valid, will likely output 0 characters. And since 0*x=0 for any finite value x, I can claim that my outputted program is actually 9999999999999999 times bigger than the source code.

YOu can create a langauge that ignores any input but EOF and outputs any character when reading an EOF. That'd be 0-byte length and a valid answer ;)

@JohannesH. For all(solvable) problems there exists a programming language that solves the problem in 0 chars.

@Cruncher and that isn'T even hard to prove.

I still move that we name that "Cruncher's Theorem", unless it's already been discovered.

See also: http://www.ioccc.org/1994/smr.hint

Haha, but does it count if the language was specifically designed to produce quines?

@JasonC This language was not specifically designed to produce quines. Take a look at H9+. The only possible quine is the program Hello, world!

@Quincunx Oops, I got sidetracked by HQ9+!

One interesting feature is that it will also contain 2*59^n-2 instances of "Hello, world!", due to the "h" in "the".

This is amazing.

Looks like you've been beat.

Also, Hello, world!Hello, world! is probably a quine in H9+.

Isn't this invalid, because H9+ requires the accumulator to be incremented before each command except the first?

Java 7: 0 chars

Save as file Blank.java. If you save it as any other file, replace any instance of Blank with the appropriate file name.
Then, run in command line via first compiling, then running. If compiling fails, stop.
I list this as Java 7 because it might output differently for different versions of Java.
First few outputs (outputted to stderr):
Error: Could not find or load main class Blank
Blank.java:1: error: class, interface, or enum expected
Error: Could not find or load main class Blank
^
Blank.java:1: error: reached end of file while parsing
Error: Could not find or load main class Blank
                                              ^
2 errors
Blank.java:1: error: class, interface, or enum expected
Blank.java:1: error: class, interface, or enum expected
^
Blank.java:1: error:  expected
Blank.java:1: error: class, interface, or enum expected
                          ^
Blank.java:1: error:  expected
Blank.java:1: error: class, interface, or enum expected
                                     ^
Blank.java:1: error: as of release 5, 'enum' is a keyword, and may not be used as an identifier
Blank.java:1: error: class, interface, or enum expected
                                          ^
  (use -source 1.4 or lower to use 'enum' as an identifier)
Blank.java:1: error: = expected
Blank.java:1: error: class, interface, or enum expected
                                               ^
Blank.java:2: error:  expected
Error: Could not find or load main class Blank
     ^
Blank.java:2: error: ';' expected
Error: Could not find or load main class Blank
      ^
Blank.java:2: error: = expected
Error: Could not find or load main class Blank
                      ^
Blank.java:2: error: = expected
Error: Could not find or load main class Blank
                                   ^
Blank.java:2: error:  expected
Error: Could not find or load main class Blank
                                              ^
Blank.java:3: error: = expected
^
^
Blank.java:3: error: ';' expected
^
 ^
Blank.java:4: error: illegal start of type
Blank.java:1: error: reached end of file while parsing
     ^
Blank.java:4: error: = expected
Blank.java:1: error: reached end of file while parsing
          ^
Blank.java:4: error: illegal start of type
Blank.java:1: error: reached end of file while parsing
           ^
Blank.java:4: error:  expected
Blank.java:1: error: reached end of file while parsing
            ^
Blank.java:4: error: = expected
Blank.java:1: error: reached end of file while parsing
          ^
Blank.java:4: error: illegal start of type
Blank.java:1: error: reached end of file while parsing
           ^
Blank.java:4: error:  expected
Blank.java:1: error: reached end of file while parsing
            ^
Blank.java:4: error: = expected
Blank.java:1: error: reached end of file while parsing
              ^
Blank.java:4: error: ';' expected
Blank.java:1: error: reached end of file while parsing
                   ^
Blank.java:4: error: = expected
Blank.java:1: error: reached end of file while parsing
                                 ^
Blank.java:4: error:  expected
Blank.java:1: error: reached end of file while parsing
                                        ^
Blank.java:4: error: = expected
Blank.java:1: error: reached end of file while parsing
                                         ^
Blank.java:4: error: ';' expected
Blank.java:1: error: reached end of file while parsing
                                              ^
Blank.java:5: error:  expected
Error: Could not find or load main class Blank
     ^
Blank.java:5: error: ';' expected
Error: Could not find or load main class Blank
      ^
Blank.java:5: error: = expected
Error: Could not find or load main class Blank
                      ^
Blank.java:5: error: = expected
Error: Could not find or load main class Blank
                                   ^
Blank.java:5: error:  expected
Error: Could not find or load main class Blank
                                              ^
Blank.java:6: error: = expected
                                              ^
                                              ^
Blank.java:6: error: ';' expected
                                              ^
                                               ^
Blank.java:7: error: reached end of file while parsing
2 errors
        ^
30 errors

"You are to write a program that will output source code that is" The output is arguably not source code. And furthermore, depending on the definition of output (whether output must come specifically from stdout) nothing is actually output.

@nitro2k01 I quote the same: "You are to write a program that will output source code". Anything is source code. But only some things are valid source code. Additionally, it was not specified what is considered output, so I am allowed freedom there.

One problem, it isn't getting larger. It is obviously useless, so each iteration is 0 characters, and not larger.

@PyRulez But they aren't all useless. Many characters contributes to the output of the program.

But the output is also useless. You see, I make questions exploit proof by including unclear words, so when people try to exploit, instead of admitting it, I can just exploit it myself.

@PyRulez That's right. I exploited your rules. You don't need to accept this answer. When I posted this, I knew that a controversy would follow, complete with many up and down votes. I decided that it would be worth it, though.

Except that I don't care if you exploited it. Another vague rule counts you out! Yeah! (You are going to try to exploit all my questions now, aren't you?)

@PyRulez This would be a good answer for your other question, but that was closed (and I voted to close it) :-).

+1 I had a similar idea (I was trying to do it with GCC but GCC has the difficulty of stopping after unrecoverable errors). The rules don't specify that source code must be valid. The "useless" term in the rule is also very ambiguous (see my comment on answer).

the problem with this kind of "smartass" solutions is that they severy reduce the motivation for others to think and send inspiring answers. And that is what its all about here, isn't it?

Are you sure that the program itself printed the output? Wasn't that only the compiler? The program gets never compiled and itself is not interpreted nor executed, thus it wasn't able to produce any output.

@blabla999 I disagree - people don't try these challenges because someone else does something crazy. We just challenge ourselves to do it some other way. As Mark Rosewater says, "Restrictions breed creativity"

@V-X: Easy, then: this is not a java(1) program, but rather a program for the javac(1) interpreter! :-)

@wchargin Now we need an answer for the ld(1) interpreter...

GolfScript, 9 chars
{.'.~'}.~

This code outputs:
{.'.~'}{.'.~'}.~

which outputs:
{.'.~'}{.'.~'}{.'.~'}.~

which outputs:
{.'.~'}{.'.~'}{.'.~'}{.'.~'}.~

and so on.
I believe this is the shortest answer in a "real" Turing-complete programming language so far.
Explanation:
Basically, the original code above is a "quine-layer": it outputs a normal quine followed by itself.
In GolfScript, any code block literal (e.g. {foo}), if left undisturbed on the stack, is a quine.  Thus, on its own, {.'.~'} simply outputs itself, just like any other code block would.
The .~ at the end of the code takes the last code block on the stack, duplicates it, and executes the copy.  When executed, the code .'.~' inside the code block duplicates the topmost item on the stack (i.e. the copy of itself) and appends the string .~.
At the end of the program, the GolfScript interpreter stringifies and outputs everything on the stack, which, in this case, consists of one more {.'.~'} block than in the input, plus the string .~.
Bonus:
Adding a ] before the first . (to collect all the code blocks on the stack into an array before they're duplicated) makes it grow exponentially:
{].'.~'}.~

outputs:
{].'.~'}{].'.~'}.~

which outputs:
{].'.~'}{].'.~'}{].'.~'}{].'.~'}.~

which outputs:
{].'.~'}{].'.~'}{].'.~'}{].'.~'}{].'.~'}{].'.~'}{].'.~'}{].'.~'}.~

and so on.

{].'.~'}.~︵ ┻━┻

@nitro2k01 my first thoughts exactly :D

@nitro2k01: Flip back that table /(@.@)/

Sorry I don't think I get the joke about the table can someone please explain?

Is "real" in quotes because HQ9+ is not real or because GolfScript is not real, or both?

@thepiercingarrow the source code resemble this

HQ9+, HQ9++ and similars, 2 characters
QQ

This is the output:
QQQQ

I saw this and thought "Oh no, nothing can beat this." I started trying to come up with something, then it hit me. So I posted an answer.

@Quincunx Bravo, upvoted your answer.

This program has a very fast rate of growth. At generation n, your program length is n^n where ^ is the exponent operator.

@Quincunx No, I think it's 2^2^n, where the initial program is generation 0. The length recurses m -> m^2.

@Vortico Good point. Even though I said it wrong, I meant: At code-length n, the output becomes n^n. However, that is false; when the code-length is n, the output's length is n^2

It is funny though because even the first two iterations are possible contenders for this question.

Ruby 27
A very slightly modified version of this (via):
puts <<3*3,3
puts <<3*3,3
3

The number of times that puts-line is printed grows exponentially.
$ ruby quine.rb | ruby | ruby
puts <<3*3,3
puts <<3*3,3
puts <<3*3,3
puts <<3*3,3
puts <<3*3,3
puts <<3*3,3
puts <<3*3,3
puts <<3*3,3
puts <<3*3,3
puts <<3*3,3
puts <<3*3,3
puts <<3*3,3
puts <<3*3,3
puts <<3*3,3
puts <<3*3,3
3

$ ruby quine.rb | ruby | ruby | ruby | ruby | ruby | ruby | ruby | wc -l
    3283

Answer inspired by the Kaiser Chiefs

Lambda Calculus - 29
A simple lambda term
(λu.(u u)(u u))(λu.(u u)(u u))

Reducing this term by one beta reduction yields
((λu.(u u)(u u))(λu.(u u)(u u)))((λu.(u u)(u u))(λu.(u u)(u u)))

And so on and so on. It's a simple variant on the classic (λu.u u)(λu.u u) which is a quine in lambda calculus, double self application here means we get twice the output.

I'd argue that in lambda calculus, "running" a lambda term means computing its normal form, not performing a single beta reduction. Also, a term can contain multiple redexes, therefore "reducing a single redex" is an ambiguous operation.

You're right, but since this term has no normal form it makes sense to talk about this in terms of small step reduction. Since lambda calculus lacks any inherent set evaluation, I can just define "running" it to be reducing a single redex top level redex with call-by-name semantics no?

Well, terms with no normal form correspond to non-terminating programs. And the problem with top level redex is that a term can have two redexes, neither one being a sub-term of another. You could pick some criterion which one to reduce, but I'd say that then you're getting very far from the standard lambda calculus semantics. (Anyway I appreciate your novel idea.)

(λx.x x x)(λx.x x x) :20

(λx. x x)(λx. x x x) reduces to that in a single step

shouldn't you write (λu.u u)(λu.(u u)(u u)) instead? it is shorter, and reduces the same.

Why not just (λu.u u)(λu.u u u)?

SH script, 9
cat $0 $0

Grows at exponential rate.
Either run as sh whatever.sh or set it as executable.
Windows version is here.

At the time of me writing this comment, the Quine Wiki page says that reading from the filesystem is cheating.

@LordRatte On the other hand, the challenge wasn't to write a quine.

dc 11
Quite simple:
6579792
dfP

The first line is repeated once every generation:
$ dc growing_quine.dc
6579792
6579792
dfP

$ dc growing_quine.dc | dc | dc
6579792
6579792
6579792
6579792
dfP

The last line consists of the following instructions: d duplicates the last value put on the stack (6579792) (so that we get one more copy each time we run it), f prints the whole stack (which is a bunch of that same number) and P prints the number (6579792) out as a byte stream, which displays as dfP.

This can be made a little shorter: 6579792pP

@m90 6579792pP outputs my original program, which isn't a strict superset of 6579792pP; the minuscule p disappears. Therefore I assume that isn't valid, unfortunately.

The requirement of the problem is only that the succesive programs be "larger", which I understood to mean having greater length, although I now see that it's not entirely clear.

redcode (recursive solution)
This is the code of the easiest warrior writable in redcode, the famous Imp:
MOV 0, 1

When executed, the code writes a copy of its single instruction at the next address in memory; then executes it, etc.

Python 3 - 55
print(open(__file__).read())
f=lambda:print('f()')
f()

This could be made shorter by replacing __ file__ with a single character filename and saving the file as that, but I felt this answer was more in the spirit of the question. After one iteration it outputs:
print(open(__file__).read())
f=lambda:print('f()')
f()
f()

This isn't a quine. See the definition.

@PetrPudlák Nor are any programs in this question. This is a quine-variant problem, not strict quining.

The lambda isn't needed if the file ends in a newline character: print(open(__file__).read()*2)

One that meets the new quine definitions is: s='s=%r;print(s%%s*2);';print(s%s)

Smalltalk, 125 61 57
The golf version looks almost unreadable so I'll explain first (and use real identifiers).
This is a variant of the "weirdest-way-to-produce-a-stack-overflow" self modifying method.
The method prints out a hello message, and its current source (for the demonstration only). Then, the code is modified to output a longer string and installed. Finally, the new code is called recursively.
In order to protect myself from an immediate runaway, it lets the user confirm in each cycle.
compile in Object:
eatMe_alice
   |msg mySource|

   mySource := thisContext method source.

   '**** Hello Alice' printCR.
   '  ---- my current code is:' printCR.
   mySource printCR.
   '  ---------------' printCR.

   (UserConfirmation confirm:'Again? ') ifTrue:[
       Object compile:
            (mySource
                copyReplaceString:'Hello ','Alice'
                withString:'Hello ','Alice !').
       self eatMe_alice
   ]

start the show by sending "eatMe_alice" to any Object; nil will do:
nil eatMe_alice
A nice variant is to not call the new code recursively, but instead iteratively, by unwindig the call stack and reentering into the new method. This has the advantage of not leading to a recursion exception. To do this, replace the recursive call ("self eatMe_alice") by:
thisContext resend

Golfing:
Obviously, printing and self calling was not asked for, so the shortest (for golf) is to simply append a comment to my own source and return it. As a side effect, it also gets installed for the next call...
x|s|Object compile:(s:=thisContext method source,'""').^s

Evoloop, 9×9 rectangle (81 cells)
The Evoloop cellular automaton included with Golly supports patterns which replicate themselves in a "quine-like" way. Specifically, these patterns each contain a "program"; a pattern reproduces itself by first executing the program (which creates the "body" of the daughter), and then by copying the program into the daughter.
The above applies to the more famous "Langton's Loops" cellular automaton as well as Evoloop, but Evoloop has an interesting difference, which is that it's easy to create a pattern which grows in each successive generation.
(Much more interesting, in my opinion, is the fact that Evoloop is a simple cellular automaton which contains patterns which reproduce themselves and evolve in a very life-like manner! I think the only known cellular automata which do this are Evoloop and its descendants. A shortcoming of Evoloop, however, is that there is one particular "best" genome; evolution always eventually converges to this one genome.)
Now, there are two shortcomings to this submission. One is that it's not clear what the "output" of a cellular automaton is. But I think that a self-reproducing automaton is "close enough" to being a quine; it's certainly no less interesting! The other shortcoming is that these patterns don't merely create a single copy of themselves; each copy of the original pattern attempts to create infinitely many copies of itself, and these copies end up interacting with each other in a destructive manner. So, I think I've met the requirements of this challenge in spirit, but not in letter.
Without further ado, the pattern is:
022222220
270170172
212222202
202000212
272000272
212000202
202222212
271041032
022222250

Here's the pattern again, in a format that can be copied and pasted into Golly:
x = 9, y = 9, rule = Evoloop
.7B$BG.AG.AGB$BA5B.B$B.B3.BAB$BGB3.BGB$BAB3.B.B$B.5BAB$BGA.DA.CB$.6BE
!

Okay, but what does it look like? It looks like this:

In the above animation, you can see the initial pattern create a larger daughter, which creates a larger granddaughter, then a larger great-granddaughter, and finally an even larger great-great-granddaughter which starts to construct a yet larger third-great-granddaughter. If you ran this pattern for a long time, it would keep going on like this forever (or perhaps they would eventually be overtaken by the evolved organisms, which are capable of reproducing much faster; I'm not sure).

When you run it long enough you get genomes which create smaller offspring, which eventually self-destruct. The 'mother' at the center stays alive.

@MarkJeronimus Yup. Those were the inspiration for this answer: I saw that there were organisms that get smaller with each generation, so I figured it would probably be possible to create one that would get larger with each generation. And sure enough.

JavaScript, 41, 40 chars
function f(){console.log(f+"f(f())")}f()

The first time you run it it outputs itself with another ;f() at the end. Subsequent runs of the output results in each "input" source printed twice.
alert would be shorter than console.log but I don't consider multiple alert dialogs to be "the" output while it seems reasonable to call multiple lines in the console as an output.

You can save one byte with "f(f())" instead of "f();f()"

This doesn't seem to work for me...

SH script, 12 8 7
Store a file with
sed p *

in its own, empty directory and run from this directory using sh [file] or set executable.

Old alternative with 8 characters, but doesn't need its own directory. Store a file with
sed p $0

and run using sh [file] or set executable.
Old alternative with 12 characters:
sed -i- p $0

This will actually output to the program file itself, but where to output was not specified. Replicates itself at an exponential rate.

You might still have chance using ed, didn't want to look through its man page...

Microscript II, 6 bytes
"qp"qp

The first iteration adds an extra qp to the end, and each successive iteration adds an extra copy of this original program to the beginning.

Runic Enchantments, 6 bytes
"'<S@>

Try it online!
This one was weird. All I had to do was remove a ~ from the original quine found by Jo King.
Every additional run appends another < to the end, e.g.:
"'<S@><<<<<<<<<

All of which do nothing.

ECMAScript 6 (38 Characters)
(f=_=>'(f='+f+')();(f='+f+')();')();

Which outputs:
(f=_=>'(f='+f+')();(f='+f+')();')();(f=_=>'(f='+f+')();(f='+f+')();')();

Edit
You could do (28 characters):
(f=_=>'(f='+f+')();'+f())();

However it will recurse infinitely and never return anything... but this can be solved by doing something like this (42 characters):
(f=_=>_?'(f='+f+')('+_+');'+f(_-1):'')(3);

Which will output:
(f=_=>_?'(f='+f+')('+_+');'+f(_-1):'')(3);(f=_=>_?'(f='+f+')('+_+');'+f(_-1):'')(2);(f=_=>_?'(f='+f+')('+_+');'+f(_-1):'')(1);

+_+ =_= +1 for emoticons

33: (f=_=>(f=${f})();.repeat(2))();

Windows .BAT, 25
@COPY %~nx0+%~nx0 CON>NUL

Grows at exponential rate.
Equivalent SH version here.

Julia, 66 chars
x="print(\"x=\$(repr(x))\\n\$x;\"^2)";print("x=$(repr(x))\n$x;"^2)

Output (134 chars):
x="print(\"x=\$(repr(x))\\n\$x;\"^2)"
print("x=$(repr(x))\n$x;"^2);x="print(\"x=\$(repr(x))\\n\$x;\"^2)"
print("x=$(repr(x))\n$x;"^2);

Result of executing the result (268 chars):
x="print(\"x=\$(repr(x))\\n\$x;\"^2)"
print("x=$(repr(x))\n$x;"^2);x="print(\"x=\$(repr(x))\\n\$x;\"^2)"
print("x=$(repr(x))\n$x;"^2);x="print(\"x=\$(repr(x))\\n\$x;\"^2)"
print("x=$(repr(x))\n$x;"^2);x="print(\"x=\$(repr(x))\\n\$x;\"^2)"
print("x=$(repr(x))\n$x;"^2);

next result (536 chars):
x="print(\"x=\$(repr(x))\\n\$x;\"^2)"
print("x=$(repr(x))\n$x;"^2);x="print(\"x=\$(repr(x))\\n\$x;\"^2)"
print("x=$(repr(x))\n$x;"^2);x="print(\"x=\$(repr(x))\\n\$x;\"^2)"
print("x=$(repr(x))\n$x;"^2);x="print(\"x=\$(repr(x))\\n\$x;\"^2)"
print("x=$(repr(x))\n$x;"^2);x="print(\"x=\$(repr(x))\\n\$x;\"^2)"
print("x=$(repr(x))\n$x;"^2);x="print(\"x=\$(repr(x))\\n\$x;\"^2)"
print("x=$(repr(x))\n$x;"^2);x="print(\"x=\$(repr(x))\\n\$x;\"^2)"
print("x=$(repr(x))\n$x;"^2);x="print(\"x=\$(repr(x))\\n\$x;\"^2)"
print("x=$(repr(x))\n$x;"^2);

Next result (1072 chars):
x="print(\"x=\$(repr(x))\\n\$x;\"^2)"
print("x=$(repr(x))\n$x;"^2);x="print(\"x=\$(repr(x))\\n\$x;\"^2)"
print("x=$(repr(x))\n$x;"^2);x="print(\"x=\$(repr(x))\\n\$x;\"^2)"
print("x=$(repr(x))\n$x;"^2);x="print(\"x=\$(repr(x))\\n\$x;\"^2)"
print("x=$(repr(x))\n$x;"^2);x="print(\"x=\$(repr(x))\\n\$x;\"^2)"
print("x=$(repr(x))\n$x;"^2);x="print(\"x=\$(repr(x))\\n\$x;\"^2)"
print("x=$(repr(x))\n$x;"^2);x="print(\"x=\$(repr(x))\\n\$x;\"^2)"
print("x=$(repr(x))\n$x;"^2);x="print(\"x=\$(repr(x))\\n\$x;\"^2)"
print("x=$(repr(x))\n$x;"^2);x="print(\"x=\$(repr(x))\\n\$x;\"^2)"
print("x=$(repr(x))\n$x;"^2);x="print(\"x=\$(repr(x))\\n\$x;\"^2)"
print("x=$(repr(x))\n$x;"^2);x="print(\"x=\$(repr(x))\\n\$x;\"^2)"
print("x=$(repr(x))\n$x;"^2);x="print(\"x=\$(repr(x))\\n\$x;\"^2)"
print("x=$(repr(x))\n$x;"^2);x="print(\"x=\$(repr(x))\\n\$x;\"^2)"
print("x=$(repr(x))\n$x;"^2);x="print(\"x=\$(repr(x))\\n\$x;\"^2)"
print("x=$(repr(x))\n$x;"^2);x="print(\"x=\$(repr(x))\\n\$x;\"^2)"
print("x=$(repr(x))\n$x;"^2);x="print(\"x=\$(repr(x))\\n\$x;\"^2)"
print("x=$(repr(x))\n$x;"^2);

I hope this is according to the rules.
It produces larger output, and the output itself is valid source code that produces larger output again.

Will the output, when ran, produce a valid entry?

In the first example the output is valid code. It’s a string literal containing 5 periods.
In the second example, entering the julia prompt itself wouldn’t do anything. I just thought that just giving the repl actually a newline character by hitting enter produces a longer output than the input.

Will "....." produce a larger version of itself?

Ah, now I understand. I just noticed it had to be recursive... time to correct my solution. Thanks for the hint.

Essentially its a quine that makes itself larger.

I guess the code is according to the rules now.

Husk, 15 11 bytes
-4 bytes thanks to Unrelated String
S+s"So+uswg

Try it online!
Outputs So+uswg"So+uswg" then S o+uswg"S o + u s w g" then S o+uswg"S   o   +   u   s   w   g"... This is a variant of the usual quine S+s"S+s" but with increasing spaces between each character in the string. Currently there's a bug in the parser that prevents double spaces in the code itself, otherwise this could forgo the unique stripping out spaces in the code section and could be 9 bytes.

Still can be 11 bytes: S+s"So+uswg

Common Lisp, 16 Characters
(print `(or ,-))
Granted, it's interactive-only, but being able to reference the current top-level form is probably the single best way to minimize a non-trivial program that meets the specification.
What would be really interesting is what blows up the fastest. Maybe something like
(print `(progn ,@(loop repeat (length -) collect -)))

+1 For Common Lisp. Looks to me like you can skip \`` and ,`?

@daniero Without the quotation, it just prints the original program, never growing. At that point, you may as well omit the or, too: (print -)

reticular, 11 bytes, noncompeting
"'34'coo1o;

This is the standard quine framework, except an extra 1 is printed after each iteration. Try it online!
First few outputs:
"'34'coo1o;
"'34'coo1o;1
"'34'coo1o;11
"'34'coo1o;111

05AB1E, 15 bytes, noncompeting
0"DÐ34çý"DÐ34çý

Try it online!
Prints 0"DÐ34çý"DÐ34çý"DÐ34çý"DÐ34çý,
which prints 0"DÐ34çý"DÐ34çý"DÐ34çý"DÐ34çý"DÐ34çý"DÐ34çý"DÐ34çý"DÐ34çý,
etc.

Both instances of DD can be replaced by Ð.

Why noncompeting?

J, 1 byte
'

Try it online!
The open quote gives, obviously, the open quote error:
|open quote
|   '
|   ^
|[-1] /home/runner/.code.tio

Note that, by the nature of J interpreter, the errors are printed to STDOUT, not STDERR.
When the above is run as code, it prints:
|open quote
|   |   '
|       ^
|[-2] /home/runner/.code.tio

Then
|open quote
|   |   |   '
|           ^
|[-2] /home/runner/.code.tio

and so on. Each time the code runs, the second line is left-padded with four bytes |   , fulfilling the requirement of this challenge.
J, proper quine variant, 25 bytes
echo,~'echo,:~(,quote)'''

Try it online!
Outputs
echo,:~(,quote)'echo,:~(,quote)'

And then it outputs itself twice, on separate lines:
echo,:~(,quote)'echo,:~(,quote)'
echo,:~(,quote)'echo,:~(,quote)'

then
echo,:~(,quote)'echo,:~(,quote)'
echo,:~(,quote)'echo,:~(,quote)'
echo,:~(,quote)'echo,:~(,quote)'
echo,:~(,quote)'echo,:~(,quote)'

and so on.
The first output is a simple variant of standard J quine. The added ,:~ concatenates itself vertically, where the resulting 2D array is printed as two rows of the same string.

Python 2, 38 37 36 34 bytes
-1 bytes thanks to Jo King
s='print"s=%r;exec s;"%s+s';exec s

Try it online!

Python 3.8 (pre-release), 39 38 36 bytes
exec(s:='print("exec(s:=%r);"%s+s)')

Try it online!

EcmaScript 6 (51 bytes):
(_=x=>'(_='+_+Array(x++).join(','+_)+')('+x+')')(2)

It produces a longer version of itself, which can produce a longer version of itself, which can produce a longer version of itself, etc. ...

Underload, 9 bytes
(:::aSSS):^

Modification on the standard underload quine, which is (:aSS):aSS. First, I changed the second :aSS into :^ since it still runs the same code (by duplicating and then running the top item of the stack, which is the stuff inside the bracket) whilst saving bytes. Then I added another S to make it so the program gets longer, and added two more :s to make it so the program it produces doesn't error.
Try it Online!

Japt, 12 bytes
"iQ ²Ä"iQ ²Ä

Try it online!
Based off the Standard Japt quine
Explanation
For first iteration
"iQ ²Ä"       // Take this string.        iQ ²Ä
       iQ     // Insert a quote.          "iQ ²Ä
          ²   // Double.                  "iQ ²Ä"iQ ²Ä
           Ä  // Concatenate 1 to end     "iQ ²Ä"iQ ²Ä1
              // Implicitly output.

On Each iteration it will concatenate another 1 to the end of the program

Jelly, 4 bytes
⁾ṘȮv

Try it online!
Originally written for a CMC in JHT.
⁾ṘȮ     "ṘȮ"
   v    evaluated with the argument
⁾ṘȮ     "ṘȮ".

 Ṙ      Print a Jelly string representation of the argument,
  Ȯ     print the argument,
        then implicitly print it again.

Julia 1.0, 33 bytes
a=[show,print]
".|>$([a;a])
".|>a

Try it online!
prints (79 bytes):
".|>Function[show, print, show, print]\n".|>Function[show, print, show, print]

then, the program is doubled each time:
".|>Function[show, print, show, print]\n".|>Function[show, print, show, print]
".|>Function[show, print, show, print]\n".|>Function[show, print, show, print]

based on this quine:
".|>[show,print]".|>[show,print]

Try it online!

PHP, 38
<?echo fgets(fopen(__FILE__,'r')).';';

It will add a semicolon at each run.

Are the semicolons useless code?

@Quincunx They are, you are right. However, what would you consider useful code?

Maybe you could put in in the ';'. Then you'd get longer outputs.

why not <?=fgets(fopen(__FILE__,'r')).';';?

;<?echo fgets(fopen(__FILE__,'r'));

Javascript - 46
(function $(){console.log('('+$+'());$()')}())

BATCH, 26
Place this code in any .bat file and it will continue to execute (in an infinite loop) and the file will grow as well.
echo echo %0 ^>^> %0 >> %0

This doesn't quite work, %0 is the command used to invoke the script, which may not have a .BAT extension. You can use %~nx0 to get the full filename of the batch file.

@JasonC AFAIK, it doesn't need the .bat to be executed. If the filename is execute.bat, you can enter either execute or execute.bat. Both will work.

The file itself needs to have a .bat extension to execute but you can leave the extension off when you execute it (when you type a command with no extension, Windows tries .com, .exe, then .bat in that order). If the filename is hello.bat, then >> %0 will write a file named hello, which isn't the original hello.bat (and can't be executed).

Batch
set d=time
copy c:\>loop.bat /B loop%d%.bat
call c:\>loop.bat

PYG (6)
P(Q,Q)

Prints it's own source code, separated by newlines. The second generation would be
P(Q,Q)
P(Q,Q)

and so forth.

OIL, 83 bytes
0
0
1
1
1
4
1
11
4
1
11
1
2
2
1
12
18
10
18
1
32
22
1
18
26
4
26
8
18
11
6
17
4
26

It first prints two lines with a zero in them, and then compares each line to line 1, if they're equal (which is the case when the file is exhausted), we print what's in cell 26. The resulting output will look the same, except with an added 33, which doesn't do anything. Next time, another line will be added, and so on.

Help, WarDoq!, 1 byte.
H
Prints Hello, World!.
Other characters than H are valid (and safe) source code (that print other variants of Hello World).

Also works in (variants of) HQ9+.

@CalculatorFeline in HQ9+ this wouldn't continue to grow.

Charcoal, non-competing, 32 bytes
Ａ´α´´´Ａ´Ｆ´α´⁺´´´´´ι´αaα´ＡＦα⁺´´ια

Try it online!
Explanation:
first, go check out this answer on the quine challenge and its explanation.
This program is that program, but with the letter a at the end of the string variable.
Ａ                      α            Assign to a
 ´α´´´Ａ´Ｆ´α´⁺´´´´´ι´αa             "α´ＡＦα⁺´´ιαa", but with ´ escape character with each
                                     character, except a
                                     these are the variable being assigned to, and the
                                     rest of the program that is not the string.

                         ´Ａ         Print Ａ to the grid. current grid: "Ａ"
                            Ｆα⁺´´ι  For each character in a, print ´ + character
                                     this results in the escaped version of the string
                                     which is the literal string that is assigned at the
                                     start, plus a escaped. current grid state: "Ａ´α´´´Ａ´Ｆ´α´⁺´´´´´ι´α´a"

                                   α Print a ("α´ＡＦα⁺´´ιαa"), which is the commands after
                                     the string assignment. final grid state vvv:
                                                  "Ａ´α´´´Ａ´Ｆ´α´⁺´´´´´ι´α´aα´ＡＦα⁺´´ιαa"

[implicitly print the grid: "Ａ´α´´´Ａ´Ｆ´α´⁺´´´´´ι´α´aα´ＡＦα⁺´´ιαa", the new program]

This new program works in the same way, except for two things:

the "a" is escaped (which has no effect, as "a" escaped is "a")
there is an "a" at the end of the program. this "a" will write an extra "a" after the source is produced. thus the program grows slowly

C, 116 149 197 189 bytes
i;main(a){printf(a="i;main(a){printf(a=%c%s%1$c,34,a,i+2);for(i=%d;i--;)",34,a,i+2);for(i=1;i--;)printf(a="printf(a=%c%s%1$c,34,a,34),",34,a);printf(a="0;printf(a=%c%s%1$c,34,a);}",34,a);}

How it works

main(a){ declares the main function with an untyped variable a.
The first printf prints the existing source code and a for loop. An integer is printf'd into the for loop. This is how the multi-quine works - each time the quine program is called, it increments d, making the for loop run more times.
The second printf is inside the for loop and prints itself, so each time the quine program is called, there are more printf's, therefore generating bigger versions of itself. Be warned that this growth is exponential, due to the for loop incrementation and the multiple printfs.
The third printf prints the remaining source code.

Requires POSIX.

Gol><>, 5 bytes
#H}"'

This, I believe, is the smallest growing quine possible in Gol><>. It duplicates the #H} over and over...
Try it online!

AsciiDots, 20 bytes
($'#a_$93#"$_@("_$-.

Try it online!

First run
Sends a dot leftward, printing the characters (@_$ with a literal and ' from the ASCII value 39. The dot then turns around and interprets the path as a string, printing the rest of the line.
(@_$'#a_$93#"$_@("_$-.

Subsequent runs
Prints (@_$' again, as well as a 0, thanks to the added @_ from the first run. The 0 ends up on the right side of the ' symbol, which means that all 0s printed in a previous run carry over. The dot safely ignores the additional 0s on its path.
(@_$'0#a_$93#"$_@("_$-.
(@_$'00#a_$93#"$_@("_$-.
(@_$'000#a_$93#"$_@("_$-.

Bash, 14 bytes
cat $0&cat $0&

Try it online!

Keg, 18 15 14 13SBCS 11 10SBCS 9SBCS 6SBCS bytes
`④⑩`④⑩

Try it online!
I've gone and done it now! No more ascii around here now folks. This will print:
`④⑩`④⑩④⑩

Which will print:
`④⑩`④⑩`④⑩`④⑩④⑩

Which prints:
`④⑩`④⑩`④⑩`④⑩`④⑩`④⑩④⑩④⑩

And so on.
Answer History
9 bytes
`::.,`⑵④⑩

This uses the same approach as the 10 byte answer
Explained
`::.,`⑵④⑩
`::.,`      #Push the string `::.,`
      ⑵     #Double the string
        ④⑩  #Print raw then nice without popping

10 bytes
`::.,`⑵:.,

This prints:
`::.,::.,`::.,::.,

Which prints:
`::.,::.,`::.,::.,`::.,::.,`::.,::.,

11 bytes
`::.,`6*:.,

This prints:
`::.,::.,::.,::.,::.,::.,`::.,::.,::.,::.,::.,::.,

Which prints:
`::.,::.,::.,::.,::.,::.,`::.,::.,::.,::.,::.,::.,`::.,::.,::.,::.,::.,::.,`::.,::.,::.,::.,::.,::.,`::.,::.,::.,::.,::.,::.,`::.,::.,::.,::.,::.,::.,`::.,::.,::.,::.,::.,::.,`::.,::.,::.,::.,::.,::.,`::.,::.,::.,::.,::.,::.,`::.,::.,::.,::.,::.,::.,`::.,::.,::.,::.,::.,::.,`::.,::.,::.,::.,::.,::.,

And so on
Try it online!
13 bytes
`::.,`!⑨*:(.,

Try it online!
This prints:
`::.,::.,`::.,::.,

Which prints:
`::.,::.,`::.,::.,`::.,::.,`::.,::.,

And so on.
14 bytes
`::.,(:.,)`:.,

Try it online!
This will create pretty much the same chain as the previous 15-byter.
15 bytes
`::.,(::.,)`:.,

This prints:
`::.,(::.,)`::.,(::.,)

Which prints:
`::.,(::.,)`::.,(::.,)`::.,(::.,)`::.,(::.,)

And so on.
Try it online!
18 bytes
`:::.,(!2/|.,)`:.,

Try it online!
This will print
`:::.,(!2/|.,)`:::.,(!2/|.,)

Which in turn prints:
`:::.,(!2/|.,)`:::.,(!2/|.,)`:::.,(!2/|.,)`:::.,(!2/|.,)

Which then prints:
`:::.,(!2/|.,)`:::.,(!2/|.,)`:::.,(!2/|.,)`:::.,(!2/|.,)`:::.,(!2/|.,)`:::.,(!2/|.,)`:::.,(!2/|.,)`:::.,(!2/|.,)

And so on.
Try it online!

JavaScript (ES6/2015), 12 bytes
a=_=>'a=_'+a

Try it online!
with invokation, 23 bytes
(a=_=>'(a=_'+a+')()')()

Try it online!
Every iteration adds an underscore to the parameter name

Wolfram Language (Mathematica), 19 bytes
ToString[10#0][]&[]

Try it online!
Returns 10 (ToString[10 #0][] & )[], which, when run, returns 10*10 (ToString[2 #0][] & )[]. From there, the beginning number is multiplied by 10 at every step, which increases the length of the code by 1.

Batch, 1 byte
a

Add prompt at head every time, error is who cares

><> (Fish), 14 bytes
'rd3*9[r:r]>o<

Try it
First iteration duplicates the : in the middle: (it actually duplicates itself):
'rd3*9[r::r]>o<

Then since there are now 2 duplication signs it will duplicate itself twice:
'rd3*9[r::::r]>o<

etc. doubling each time.
><> (Fish), 9 bytes (Boring version)
':rd3*>o<

Try it
This simply duplicates the < at the end:
':rd3*>o<<
':rd3*>o<<<

etc. So the functionality of the program won't be effected at all. It's basically a  comment.

Pushy, 7 bytes
95&34_"

Non-competing as the language postdates the challenge. This outputs:
95 95 34
__"

which in turn outputs:
95 95 34
95 95 34
__"

and so on. After ~5 runs it looks like this:
95 95 34 95 95 34 95 95 34 95 95 34
95 95 34 95 95 34 95 95 34 95 95 34
__"__"__"__"
95 95 34 95 95 34 95 95 34 95 95 34
95 95 34 95 95 34 95 95 34 95 95 34
__"__"__"__"

k
41 bytes
f:{{(2*#x)#x}"f:",x,";`0:f@$f;"};`0:f@$f;

This program prints a copy of itself, and then doubles it. Thus it grows.
33 bytes
`0:{,//$("`0:";o;"[";x;"1];")}[1]

This program prints itself, but with an ever-growing number as the argument. This works in the closed-source interpreter.

Alice, 14 bytes
" <@o&h:2d+2..

Try it online!
Subsequent versions will have an increasing number of spaces after the ".
Explanation
" <@o&h:2d+2.."   Push the code points of the source code, except for the
                  quotation marks.
<                 Send the IP back west.
"..2+d2:h&o@< "   Push the code points of the source code, except for the
                  quotation marks, in reverse.
..                Make two copies of the space. One will be the additional
                  space, one will be turned into the quotation mark.
2+                Add two, to turn 32 (space) into 34 (quote).
d                 Push the stack depth. This is about twice the number of characters
                  we want to print, because there's still the first copy of the source
                  on the stack. But it's two less than twice that number, because the
                  additional space and the quote aren't duplicated.
2:                Halve the value.
h                 Increment to account for the space and quote.
&                 Repeat the next command that many times.
o                 Print that many characters from the top of the stack.
@                 Terminate the program.

shortC, 99 bytes
i;ARa="i;ARa=%c%s%c,34,a,34,i+2);Oi=%d;i--;)",34,a,34,i+2);Oi=2;i--;)Ra="Ra=%c%s%c,34,a,34",34,a,34

Java 8, 92 bytes
v->{String s="v->{String s=%c%s%1$c+1;return s.format(s,34,s);}//";return s.format(s,34,s);}

Try it online.
Outputs (4 bytes larger):
v->{String s="v->{String s=%c%s%1$c+1;return s.format(s,34,s);}//"+1;return s.format(s,34,s);}//

Try first output program.
Which outputs (2 bytes larger):
v->{String s="v->{String s=%c%s%1$c+1;return s.format(s,34,s);}//1"+1;return s.format(s,34,s);}//1

Try second output program.
Which outputs (2 bytes larger):
v->{String s="v->{String s=%c%s%1$c+1;return s.format(s,34,s);}//11"+1;return s.format(s,34,s);}//11

Try third output program.
etc. (2 bytes larger every new program)
Explanation:
quine-part:

The String s contains the unformatted source code.
%s is used to input this String into itself with the s.format(...).
%c, %1$c and the 34 are used to format the double-quotes.
s.format(s,34,s) puts it all together

Challenge part:

Unformatted source code contains +1 and // to make the output program larger and compilable.
+1 adds a 1 to both the unformatted and formatted program.

Befunge-98 (FBBI), 38 bytes
::3a*3+-8jrfjj2,g0_0g,"+2",,1+:3d*`#@_

Try it online!

Python 3, 54 chars
print((lambda s:s%s)('print((lambda s:s%%s)(%r)*2);'))
I simply modified this quine.
You can try it simply doing python this.py | python | python ... | python many times.
Edit: found this problem on the homepage and discovered too late that it is old.

There's no issue solving old challenges.

C (gcc), 132 bytes
It's not often you get to recycle answers from other questions.
x;*s="x;*s=%c%s%c;main(i){for(i=__LINE__;i--;puts(&x));printf(s,34,s,34);}";main(i){for(i=__LINE__;i--;puts(&x));printf(s,34,s,34);}

Try it online!

Haskell, 155 bytes
g=putStrLn("n=1"++show n++('-'<$[1..n]));main=(\s->putStr s>>print s>>g)$"g=putStrLn(\"n=1\"++show n++('-'<$[1..n]));main=(\\s->putStr s>>print s>>g)$"
n=2

Try it online!

W, 15 bytes
A proper quine, except it grows very oddly.
pp34CS+"pp34CS+

Iterations (You can see that the output gets between and after the source code... ):
pp34CS+pp34CS+"pp34CS+
pp34CS+pp34CS+pp34CS+pp34CS+"pp34CS+pp34CS+

Python 2, 31 bytes
s='s=%r;print s%%s*2;';exec s%s

Try it online!
the next iterations are:
s='s=%r;print s%%s*2;';print s%s*2;s='s=%r;print s%%s*2;';print s%s*2;
# ------------------------------------
s='s=%r;print s%%s*2;';print s%s*2;s='s=%r;print s%%s*2;';print s%s*2;
s='s=%r;print s%%s*2;';print s%s*2;s='s=%r;print s%%s*2;';print s%s*2;
# -------------------------------------
s='s=%r;print s%%s*2;';print s%s*2;s='s=%r;print s%%s*2;';print s%s*2;
s='s=%r;print s%%s*2;';print s%s*2;s='s=%r;print s%%s*2;';print s%s*2;
s='s=%r;print s%%s*2;';print s%s*2;s='s=%r;print s%%s*2;';print s%s*2;
s='s=%r;print s%%s*2;';print s%s*2;s='s=%r;print s%%s*2;';print s%s*2;
# ------------
...

Python 3, 33 bytes
a='a=%r;print(a%%a*2);';exec(a%a)

Try it online!
a='a=%r;print(a%%a*2);';print(a%a*2);a='a=%r;print(a%%a*2);';print(a%a*2);
# ------------------------------------
a='a=%r;print(a%%a*2);';print(a%a*2);a='a=%r;print(a%%a*2);';print(a%a*2);
a='a=%r;print(a%%a*2);';print(a%a*2);a='a=%r;print(a%%a*2);';print(a%a*2);
# -------------------------------------
a='a=%r;print(a%%a*2);';print(a%a*2);a='a=%r;print(a%%a*2);';print(a%a*2);
a='a=%r;print(a%%a*2);';print(a%a*2);a='a=%r;print(a%%a*2);';print(a%a*2);
a='a=%r;print(a%%a*2);';print(a%a*2);a='a=%r;print(a%%a*2);';print(a%a*2);
a='a=%r;print(a%%a*2);';print(a%a*2);a='a=%r;print(a%%a*2);';print(a%a*2);
# ------------
...

C (gcc), 71 bytes
#define a(b)*s=#b;b
a(main(){printf("#define a(b)*s=#b;b\na(%s;)",s);})

Every iteration adds a semicolon after the closing brace of the main function.
Try it online!

Lua, 58 bytes
f="f=%qprint(f:format(f):rep(9))"print(f:format(f):rep(9))

Attempt This Online! Repeats the formatted string 9 times.
This is the result of iteration 1:
f="f=%qprint(f:format(f):rep(9))"print(f:format(f):rep(9))f="f=%qprint(f:format(f):rep(9))"print(f:format(f):rep(9))f="f=%qprint(f:format(f):rep(9))"print(f:format(f):rep(9))f="f=%qprint(f:format(f):rep(9))"print(f:format(f):rep(9))f="f=%qprint(f:format(f):rep(9))"print(f:format(f):rep(9))f="f=%qprint(f:format(f):rep(9))"print(f:format(f):rep(9))f="f=%qprint(f:format(f):rep(9))"print(f:format(f):rep(9))f="f=%qprint(f:format(f):rep(9))"print(f:format(f):rep(9))f="f=%qprint(f:format(f):rep(9))"print(f:format(f):rep(9))

DipDup, 12 bytes
[[_^!]:_:]_:

Try it online!
The TIO link is the DipDup interpreter written in Haskell.
Based on my DipDup quine: [_:]_:. [_^!]: converts a block [abc] to [[abc]_^!], which is equivalent to [abc] but longer.
This outputs [[_^!]:_:][_^!]:_:. After that, [abc]abc becomes [[abc]_^!][abc]_^! in each step.

Rust, 61 bytes
fn main(){print!("const _:()=();{}",include_str!("main.rs"))}

Is it cheating to use include_str!? :P In any case, it just keeps adding a dummy constant, growing the program larger every time.

Sorry, but include_str! is cheating. Our rules for [quine] challenges are at https://codegolf.meta.stackexchange.com/a/4878

JavaScript, 33 bytes (27 if alert)
f=_=>console.log(`f=${f};f(f())`)

Try it:

console.log('First execution');

f=_=>console.log(`f=${f};f(f())`)

f();

console.log('After prev execution');

f=_=>console.log(`f=${f};f(f())`);f(f())

console.log('After prev execution');

f=_=>console.log(`f=${f};f(f())`);f(f())
f=_=>console.log(`f=${f};f(f())`);f(f())

console.log('After prev execution');

f=_=>console.log(`f=${f};f(f())`);f(f())
f=_=>console.log(`f=${f};f(f())`);f(f())
f=_=>console.log(`f=${f};f(f())`);f(f())
f=_=>console.log(`f=${f};f(f())`);f(f())

//...

source: Stack Exchange

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/3.0/

sort: votes