Consider a unconventional billiard board in the shape of an equilateral triangle (depicted below). An incredibly small ball (size in picture is increased for the sake of visibility on your screen) is put in the A corner.
How many paths for the ball are there such that the ball bounces off the sides exactly 20160127 times, starting and ending in the A corner?
Note: the question is heavily inspired by a question on the Project Euler website, which I enjoyed very much solving.