I've posted a question, so to celebrate, I decided to play pool. Somehow my house has tables with holes at four corners of any dimensions. The ball and the holes are negligibly small (epsilon by epsilon).
My mathematical friend says, "I will give you a rectangular table where are positive integers summing to 2015. It's up to me to decide. Hahaha. Then we will play." Then he will put the ball at one corner.
I am very bad at aiming, so I only have a machine that will shoot the ball at an angle of 45° to the sides of the table. My evil friend wants the ball to bounce as many times as possible before it reaches any hole so that the ball can lose as much kinetic energy as possible and leave me in suspense.
I calculate that the maximum number of bounces is .
For how many ordered pairs does the number of bounces equal ?
As an explicit example, a table needs 1 bounce, and a table needs 3 bounces. A table needs 2013 bounces.
You may make the assumption that we are decent mathematicians, although we can't play pool and do weird things. Note also that this is combinatorics, not computer science.