Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

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.

share|improve this question
This is a very nice looking graph. –  Emmad Kareem Sep 1 '12 at 23:32
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. –  Henning Makholm Sep 1 '12 at 23:39
It seems interesting and highly symmetric like a gaussian or laplace distribution. Meanwhile what is $\zeta$ –  Seyhmus Güngören Sep 2 '12 at 0:05
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. –  Gerry Myerson Sep 2 '12 at 6:04
@Seyhmus: $\zeta(k)$ is the Riemann zeta function –  Henry Sep 2 '12 at 7:48

1 Answer 1

up vote 2 down vote accepted

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...

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.