adding tail recursive solution to sequence
fucnprog 6.11