14
2
Write a program with length n that outputs another program whose length is the next Fibonacci number after n. The new program must do the same thing - output another program whose length is the next Fibonacci number, etc.
n itself (the original program's length) does not have to be a Fibonacci number, although it would be nice if it is.
Shortest code wins.
No external resources, ASCII only, free compiler/interpreter required.
If your output ends in a newline, it is also counted.
Does this need to continue on forever? (
int
orBigInteger
) – Justin – 2014-06-10T21:39:50.1301@Quincunx it's ok if it stops working at int's limit or compiler/interpreter's limit, whichever comes first. I expect it to get to 10000+ though. – aditsu quit because SE is EVIL – 2014-06-10T21:41:47.447
1Are there restrictions on use of whitespace or comments or arbitrarily long variable/function/class names in either the original or subsequently produced programs? – Jonathan Pullano – 2014-06-10T21:45:12.107
1Can the program read its own source code, or are you looking for a true quasi-quine? – histocrat – 2014-06-10T21:47:39.977
@JonathanPullano no restrictions, they just need to be valid programs – aditsu quit because SE is EVIL – 2014-06-10T21:53:13.407
@histocrat I think reading own source is ok – aditsu quit because SE is EVIL – 2014-06-10T21:55:33.133