Here's my equivalent of rahmu's f() function:
f = lambda n: "".join(map(lambda a: map(lambda b: str(b.count(b[0]))+b[0], [a.group()])[0], re.finditer(r"([0-9])\1*", n)))
Here's a use of it by another one-liner:
f = lambda n,dummy=None: "".join(map(lambda a: map(lambda b: str(b.count(b[0]))+b[0], [a.group()])[0], re.finditer(r"([0-9])\1*", n)))
morrseq = lambda n: reduce(f, ["1"] + range(n))
Result:
>>> morrseq(1)
'11'
>>> morrseq(2)
'21'
>>> morrseq(3)
'1211'
>>> morrseq(4)
'111221'
>>>
All of it in a single one-liner:
morrseq = lambda m: reduce(lambda n,dummy=None: "".join(map(lambda a: map(lambda b: str(b.count(b[0]))+b[0], [a.group()])[0], re.finditer(r"([0-9])\1*", n))), ["1"] + range(m))
Edit:
PS: Including the "import re" this clocks in at 168 characters(excluding newlines and spaces). Better than rahmu's 184(And that's without the use of the f() function which would've added even more) but doesn't even get close to geek's 87