Problem 422

Sequence of points on a hyperbola

Let H be the hyperbola defined by the equation 12`x`^{2} + 7`x``y` - 12`y`^{2} = 625.

Next, define X as the point (7, 1). It can be seen that X is in H.

Now we define a sequence of points in H, {P_{i} : `i` 1}, as:

- P
_{1}= (13, 61/4). - P
_{2}= (-43/6, -4). - For
`i`> 2, P_{i}is the unique point in H that is different from P_{i-1}and such that line P_{i}P_{i-1}is parallel to line P_{i-2}X. It can be shown that P_{i}is well-defined, and that its coordinates are always rational.

You are given that P_{3} = (-19/2, -229/24), P_{4} = (1267/144, -37/12) and P_{7} = (17194218091/143327232, 274748766781/1719926784).

Find P_{n} for `n` = 11^{14} in the following format:

If P_{n} = (`a`/`b`, `c`/`d`) where the fractions are in lowest terms and the denominators are positive, then the answer is (`a` + `b` + `c` + `d`) mod 1 000 000 007.

For `n` = 7, the answer would have been: 806236837.

**
These problems are part of
Project Euler
and are licensed under
CC BY-NC-SA 2.0 UK
**