MathOverflow is a question and answer site for professional mathematicians. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

In the pre-MO era, I once realized that on the integers, the function

$$ d(m, n) := \sqrt{\log \frac{\sqrt{mn}} {\text{gcd}(m,n)}}\ , $$

is a metric (all properties are easily verified; in fact this is a Hilbertian metric).

Now that I got reminded of it, I wanted to ask

Has anyone seen this metric before? If so, in what context? What could be potential applications of this metric?

Added Given the formulae mentioned by Emil and Quid, an additional thing that I am wondering about is the following (I hope I'm not being obtuse):

Does the fact that $d(m,n)=\|\phi(m)-\phi(n)\|$, where $\phi(m)$ and $\phi(n)$ lie in some Hilbert space, have any interesting ramifications?

share|cite|improve this question
Without the outer square root (which does no harm to the triangle inequality), the expression amounts to a weighted sum of distances measured by $p$-adic valuations: $d(m,n)^2=\frac12\sum_p|v_p(m)-v_p(n)|\log p$. This should explain why it is a metric. – Emil Jeřábek Sep 19 '11 at 16:30

The closest thing I am aware of would be a word metric. More precisely the word metric on the group of positive rationals (with multiplication) relative to the natural generating set formed by the prime numbers and their reciprocals.

The distance between two (positive) integers $m,n$ in this metric is then $$\sum_p |v_p(m) - v_p(n)|$$ where the sum goes over the primes and $v_p$ is the p-adic valuation.

As per Emil's comment your metric is then closely related to a 'weighted version' of this.

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