#Retina, <s>62</s> <s>43</s> 35 bytes 8 bytes thanks to [@Martin Büttner](http://codegolf.stackexchange.com/users/8478/martin-b%C3%BCttner). ^ 11: $ ;1$`;11$` (1+):(\1*)1* $1$2 [Try it online!](http://retina.tryitonline.net/#code=XgoxMToKJAo7MSRgOzExJGAKKDErKTooXDEqKTEqCiQxJDI&input=MTExMQ) Input in unary, output in unary separated by semi-colon (`;`). ##Previous 43-byte version: .+ 11:$&;111:$&;1111:$& \b(1+):(\1*)1* $1$2 [Try it online!](http://retina.tryitonline.net/#code=LisKMTE6JCY7MTExOiQmOzExMTE6JCYKXGIoMSspOihcMSopMSoKJDEkMg&input=MQ) Input in unary, output in unary separated by semi-colon (`;`). ##Previous 62-byte version: .+ $&11;$&111;$&1111 ((11)+)1*;((111)+)1*;((1111)+)1* $1;$3;$5 [Try it online!](http://retina.tryitonline.net/#code=LisKJCYxMTskJjExMTskJjExMTEKKCgxMSkrKTEqOygoMTExKSspMSo7KCgxMTExKSspMSoKJDE7JDM7JDU&input=MTExMQ) Input in unary, output in unary separated by semi-colon (`;`).