Download code

Jump to: navigation, search

Back to Look_and_say_sequence_(sed)

Download for Windows: single file, zip

Download for UNIX: single file, zip, tar.gz, tar.bz2

conway.sed

 1 :A
 2 p
 3 s/^/@/
 4 :B
 5 s/@\(.\)\1\1/3\1@/;tB
 6 s/@\(.\)\1/2\1@/;tB
 7 s/@\(.\)/1\1@/;tB
 8 
 9 s/@//
10 bA