Skip to content

Instantly share code, notes, and snippets.

@nicholasklick
Last active December 25, 2015 00:19
Show Gist options
  • Save nicholasklick/6887251 to your computer and use it in GitHub Desktop.
Save nicholasklick/6887251 to your computer and use it in GitHub Desktop.
# Here's a sequence of numbers where each line is
# generated by semantically counting and printing the numbers
# in the previous line:
#
# 1
# 11
# 21
# 1211
# 111221
# 312211
# 13112221
# ...
#
# one
# one one
# two one
# one two one one
# In any programming language you want
# (Python/Ruby/JavaScript/Java/whatever,) can you write a function that,
# given some number n as an input, prints out the first n items in the
# sequence.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment