Has anyone come across a graph like this?

enter image description here

The black circles represent rationals in $(0,1)$ and their heights are roughly proportional to the reciprocal of the square of their lowest terms denominator. The red lines are drawn by eye on the pattern of the black dots.

This came from trying to create a probability distribution on the rationals where $$\Pr\left(X = \frac{a}{b}\right) = \frac{\zeta(k)}{\zeta(k-1) - \zeta(k) } \left(\frac{1}{b}\right)^k$$ where $0 \lt a \lt b$ with $a$ and $b$ coprime and where $k \gt 2$.

The red lines look somewhat like the left half of the Stern-Brocot Tree except that points with different denominators are at different heights.

  • 6
    $\begingroup$ This is a very nice looking graph. $\endgroup$
    – NoChance
    Sep 1, 2012 at 23:32
  • 2
    $\begingroup$ I'd say that the red lines are the left half of the Stern-Brocot tree. The heights used in a diagram that represents the tree are not an intrinsic feature of the tree itself. $\endgroup$ Sep 1, 2012 at 23:39
  • 1
    $\begingroup$ It seems interesting and highly symmetric like a gaussian or laplace distribution. Meanwhile what is $\zeta$ $\endgroup$ Sep 2, 2012 at 0:05
  • 2
    $\begingroup$ I think you mean the heights are roughly proportional to the reciprocal of the square of the denominator. The function $f(p/q)=1/q$, $f(x)=0$ for $x$ irrational is the standard example of a function continuous at $x$ if and only if $x$ is irrational. You are (roughly) squaring that function. $\endgroup$ Sep 2, 2012 at 6:04
  • 1
    $\begingroup$ @Seyhmus: $\zeta(k)$ is the Riemann zeta function $\endgroup$
    – Henry
    Sep 2, 2012 at 7:48

2 Answers 2


As Gerry mentions, this is (roughly) the square of Thomae's function, also known as the popcorn function, the raindrop function, the countable cloud function, the modified Dirichlet function, the ruler function, the Riemann function, or the Stars over Babylon...

  • $\begingroup$ Rahul Can you help Connection of complex $e^z$ and real Dirichlet please? $\endgroup$
    – BCLC
    Aug 19, 2018 at 6:27
  • $\begingroup$ @BCLC No thanks, that doesn't look like a question I would like to answer. $\endgroup$
    – user856
    Aug 19, 2018 at 6:56

It is surprising that no one has mentioned Ford circles. The heights of the centers of Ford circles are exactly proportional to the reciprocals of the denominators.

Let us suppose that the content of the section on total area of Ford circles is correct. Then if a point is randomly chosen in the interior of one of the Ford circles corresponding to a rational number in the interval $[0,1]$, the probability of its being in any region proportional to the region's area, then the probability that it is in the circle corresponding to a particular rational number with denominator $k$ is $$ \frac{\zeta(4)}{\zeta(3)} \left(\frac 1 k\right)^4. $$


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .