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. [![Ett javla fint biljardbord, eller hur?][1]][1] > 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](https://projecteuler.net/) website, which I enjoyed very much solving. Hint: >! Case: 11 bounces, 2 paths; Case: 10001 bounces, 800 paths; Case: 1000001 bounces, 80840 paths. **Additional information**: There is also a [paper][2] on the matter if you are intrested to read more. [1]: https://i.sstatic.net/Jy0nY.png [2]: https://arxiv.org/PS_cache/math/pdf/0509/0509292v7.pdf