implementation of John Conway 'look and say' algorithm