This site is supported by donations to The OEIS Foundation.

# Notation matters

## Knuth's notation for relatively prime

On November 4, 2010, the phi-torial of n A001783 was selected as the "Sequence of the Day". A001783 states in the title:
"The phi-torial of n is the product k, 1 ≤ k ≤ n, k relatively prime to n."
This was translated to the formula

${\displaystyle \prod _{i=1}^{n-1}\delta _{1}^{\gcd(i,n)}i}$

With Knuth's notation this could also be written as

${\displaystyle \prod _{\stackrel {1\leq k\leq n}{k\perp n}}k}$

For me the second formula is much easier to parse and to understand than the first formula (just compare the formulas to the definition in plain English). And it does not presuppose the knowledge of the Kronecker delta. Moreover, Knuth's notation is easy to generalize without additional clutter (for an example see here).

However, to say that the first formula is not optimal would be an euphemism. To see this consider the strange name 'phi-torial'. Clearly this name relates to the factorial numbers.

${\displaystyle \prod _{1\leq k\leq n}k}$

So we just have to add three symbols to this formula to go from the factorial to the phitorial. This is simple and intuitive; compared to that the first formula can be understood best as an elaborated way to conceal the intended meaning.

In 1989 Knuth, Graham and Patashnik wrote in a book which now is a standard reference (Concrete Mathematics):

 Hear us, O mathematicians of the world! Let us not wait any longer! We can make many formulas clearer by defining a new notation now! Let us agree to write m ⊥ n, and to say "m is prime to n", if m and n are relatively prime.

To say 'a is prime to b' is for me a good arithmetical overload of the geometrical 'a is orthogonal to b' and agrees well with my intuition.

I do not understand why 21 years later some people still stick to cumbersome 19th century notation as some simple "changes would improve the current situation and make it easier on all future mathematicians".

## The perils of bad notation

In the meantime Alonso del Arte draw my attention to the fact that the Kronecker-delta-based formula as displayed above is plain wrong. Indeed it computes the phitorial for n ≥ 1 as 1, 1, 2, 0, 24, 0, 720, 0, 0, 0, ...

Now this is an important observation as it shows that the use of the Kronecker-delta-based formula requires some kind of additional thought; this is in contrast to the use of `kn´ which is just attached to the summation symbol without any further consideration or changes to the main formula. The benefit clearly is: the danger to produce errors is thereby almost eliminated. Likewise the chance that a manifest error is overlooked because hidden in some complex notation is reduced.

Thus Alonso del Arte's observation highlights what constitutes a good notation.

## A second example

${\displaystyle \Omega (n)=\delta _{1}^{\{\pi (n)-\pi (n-1)\}}+\delta _{0}^{\{\pi (n)-\pi (n-1)\}}\sum _{i=1}^{\pi (\lfloor {\sqrt {n}}\rfloor )}\sum _{j=1}^{\lfloor \log _{p_{i}}n\rfloor }\delta _{{\big \lfloor }{\frac {n}{{p_{i}}^{j}}}{\big \rfloor }}^{{\big \lceil }{\frac {n}{{p_{i}}^{j}}}{\big \rceil }}\,}$

Whoever wants to see such a monster? What does it say? What insight does this formula give? Who needs this? In my eyes it is just thieving the time of the reader who tries to parse it. Such a formula is notational humbug. [Humbug = creating public sensations and fascination with a circus of bad notation.] Such formulas should in my opinion be exhibited in television shows like 'Pimp-My-Formula' but not on the OeisWiki. Moreover, this formula does not employ the notion and notation of p-adic order, which is fundamental here. The following two sentences (adapted from Wikipedia) could replace most of the introduction of the article about Omega .

In number theory, for a given prime number p, the p-adic order of a number n is the highest exponent ν such that pν divides n; it is commonly abbreviated νp(n). Ω(n) is the total number of prime factors of n; thus

${\displaystyle \Omega (n)=\sum _{{p\mid n} \atop {p~{\rm {prime}}}}{\nu _{p}(n)}.}$