← Complete problem index

PROJECT EULER · #0972

Hyperbolic Plane

Statement only · SolvedOriginal problem ↗

The hyperbolic plane can be represented by the open unit disc, namely the set of points (x,y) in R2 with x2+y2<1.

A geodesic is defined as either a diameter of the open unit disc or a circular arc contained within the disc that is orthogonal to the boundary of the disc.
The following diagram shows the hyperbolic plane with two geodesics; one is a diameter and the other is a circular arc.

0972_hyperbolic.png

Let V(N) be the set of points (x,y) such that x2+y2<1 and x,y are both rational numbers with denominator not exceeding N.

Let T(N) be the number of ordered triples (P,Q,R) such that P,Q,R are three different points in V(N) and there is a hyperbolic line passing through all of them.
For example, T(2)=24 and T(3)=1296.

Find T(12).

Write-up coming later

The complete problem is available here. An approach, code, and answer will be added later.