If you would like to generate this sequence yourself, you can either Learn to program, or you can use the following bit of Python code. I wrote this to investigate a new feature of Python called generators, (a.k.a. co-routines), so it will look a little weird.
The code generates as many terms as you might want of the sequence detailed above - have fun playing with it! All computer science dorks (like myself) should note that the running time of this program is
O(2n), but that's unavoidable because the sequence is doubly exponential, so the number of digits in the answer we have to write down grows exponentially every time. It does allow you to generate the sequence in any base you want, though - which is kind of cool.
# Compute the audioactive sequence using coroutines. We can calculate it in
# any base, but since no number higher than 3 ever appears, it is all the same
# for bases 4 and higher
from __future__ import generators
def convertToBase(num, base):
rv = ""
while num > 0:
rv = ("%d" % (num % base)) + rv
num = num / base
s = '1'
snew = ""
count = 0
curr = ''
for i in s:
if i != curr:
snew = snew + "%s%s" % (convertToBase(count,base),curr)
count = 1
curr = i
count = count+1
s = snew + "%s%s" % (convertToBase(count,base),curr)
if __name__ == '__main__':
from sys import argv, exit
if len(argv) < 3:
print "Usage:", argv, " number base"
sequence = audioactive(int(argv))
for i in xrange(int(argv)):
The first 10 terms of the sequence in base 2 look like: