my solution to problem:
https://www.hackerrank.com/challenges/functions-and-fractals-sierpinski-triangles

Mauro