9 06 2012


Dedekind psi function called my attention, when I was trying to find trivial properties and formulas related to Jordan’s totient functions, that are indeed just generalizations of Euler’s totient function. At that time I realize that values in range of psi had similarities to those of divisor sigma, because trivialy: \sigma_{1}(n) - \psi(n) \geq 0, (inequality that holds for squarefree numbers). So, It seems reasonable to look for an alternate inequality to Robin’s criterion but with Dedekind psi instead of divisor function.

Fortunately, this question was settled, before my discovery of gunpowder, by true mathematicians like Patrick Sole and Michel Planat ([3] and [4]).

Riemann Hypothesis (RH) is true if and only:

\psi(n) 30

After I found these papers on the internet, my interest on Dedekind psi function became huge, and then I begun to look for more and more information about this arithmetical function on my library. But the real thing is that psi is never given the importance on every Number Theory book that it deserves. This was good to me because it gave me the opportunity to populate The On-Line Encyclopedia of Integer Sequences with my trivialities related to this function. This the modest mission of this blog: to create math not in the books.

As I’m a copycat and Euler’s totient is first cousin of Dedekind psi, the idea is to turn \varphi formulas into \psi with a small retouch, for example if:


Then you can discover the unpublished:


The same thing can be done “recycling” the analytic theorems about the average order of number theoretical functions that came on the most cited book on the topic: Hardy and Wright’s An Introduction to the Theory of Numbers, particularly Theorem 330 on the average order of Euler’s Totient can be easily rewritten to get, the not so easy to find, average order of Dedekind psi, just implementing the following expressions along theorem development:

\psi(n)= n \cdot \prod_{p|n}{\left( 1 + \frac{1}{p} \right)}

\psi(n)= n \cdot \sum_{d|n}{ \frac{|\mu(d)|}{d} }

(Taken from [4])

\sum_{d=1}^{\infty}{\frac{|\mu(d)|}{d^{2}}} = \frac{15}{{\pi}^{2}}

(See [6])

\Psi(n) = \sum_{m=1}^{n}{\psi(m)} = m \cdot \sum_{d|m}{ \frac{|\mu(d)|}{d}} = \sum_{d \cdot d^{\prime} \leq n}{d^{\prime} \cdot |\mu(d)|} = \sum_{d=1}^{n}{|\mu(d)| \cdot \sum_{d^{\prime}=1}^{\lfloor \frac{n}{d} \rfloor}{d^{\prime}} = \frac{1}{2} \sum_{d=1}^{n}{|\mu(d)| \bigg( \bigg\lfloor \frac{n}{d} \bigg\rfloor^{2} + \bigg\lfloor \frac{n}{d} \bigg\rfloor \bigg) =

\frac{1}{2} \sum_{d=1}^{n}{|\mu(d)| \bigg\{ \frac{n^{2}}{d^{2}} + O \bigg( \frac{n}{d} \bigg) \bigg\} } = \frac{n^2}{2} \sum_{d=1}^{n}{ \frac{|\mu(d)|}{d^2} + O \bigg( n \sum_{d=1}^{n}{ \frac{1}{d} \bigg) } = \frac{n^2}{2} \sum_{d=1}^{n}{ \frac{|\mu(d)|}{d^2} + O \bigg( n^{2} \sum_{n+1}^{\infty}{ \frac{1}{d^2} \bigg) + O(n \cdot \log{n}) =

\frac{15n^{2}}{2{\pi}^2} + O(n) + O(n \cdot \log{n}) = \frac{15n^{2}}{2{\pi}^2} + O(n \cdot \log{n})


Then the average order of \psi(n) is \frac{2}{n} \cdot \frac{15n}{{\pi}^2} = \frac{15n}{\pi^2}


 [1]-Patrick Sole and Michel Planat, Extreme values of the Dedekind Psi function, to appear in Journal of Combinatorics and Number Theory, arXiv:1011.1825v2
[2]-Michel Planat, Riemann hypothesis from the Dedekind psi function, arXiv:1010.3239v2
[3]-G.H. Hardy, E.M. Wright, An Introduction to the Theory of Numbers, Oxford University Press, 1979, 5th Edition pp 268, Theorem 330.
[4]- N. J. A. Sloane, The On-Line Encyclopedia of Integer Sequences. A001615: Dedekind psi function: n * Product_{p|n, p prime} (1 + 1/p)
[5]- Jonathan Vos Post, Feb 15 2010, The On-Line Encyclopedia of Integer Sequences. A173290: Partial sums of A001615.
[6]- N. J. A. Sloane, May 09 2003, The On-Line Encyclopedia of Integer Sequences. A082020: Decimal expansion of 15/Pi^2.


31 07 2010

As I´m working on, more than one, small projects of programming sequences from The On-Line Encyclopedia of Integer Sequences, and as I always try to document my code the best I can: I like to add comments and help information to it, but after many hours of “copy and paste”, and being aware that when you are trying to do something with a computer: if you feel that everything is repetitive and boring, then it is for sure, that you are using the wrong procedure, so then, I decided to create a very simple tools to make my life easier.

The PHP code of these two on-line applications is almost the same than the one of OEIS2BibTeX, but this time changed to provide the help code for PARI/GP or Mathematica OEIS sequences functions.

Both applications can be used in two different ways:

* Entering the Sequence Id number with a HTML form: in a POST METHOD, or
* With the Id Number supplied to the PHP code within the link, using ?sequence=valid_ID


1.1) HTML POST Method:

1.2) PHP Parameter:
Here you can change A000200 for the desired Sequence Id Number:


2.1) HTML POST Method:

2.2) PHP Parameter:

2.3) Mathematica Code using Import:

As Mathematica can access on-line data, these functions can do the job too inside any Mathematica Notebook or Package:

OEISSequenceDescription[seq_String]:=Module[{dataloaded = StringJoin[Import["http://oeis.org/classic/?q=id%3a" <> seq <> "&fmt=3","Data"]], first, last},
first = Flatten[StringPosition[dataloaded, "%N"], 1][[2]];
last = Select[StringPosition[dataloaded, "%"][[All, 1]], # > first&][[1]];
StringReplace[StringTake[dataloaded, {first + 10, last - 1}], "  " ~~ _ -> ""]]

OEISAddHelp[seq_String]:=ToExpression[StringJoin[seq, "::usage=\"",seq, ": ", OEISSequenceDescription[seq], "\""]]

[a]-073110-Adding Help to OEIS Sequences.nb


[1]-PARI/GP Development Headquarters – Programming in GP: other specific functions-addhelp
[3]-Wolfram Mathematica Documentation Center: Import
[4]-E.Pérez Herrero-OEIS Utilities Page@ OEIS Wiki


11 07 2010

Euler´s totient function: \phi(n) is defined as the number of positive integers less than or equal to n, that are coprime to n, and using Iverson bracket, \phi can be written as: (See reference [1])

\phi(n) =\sum_{i=1}^{n}{[gcd(i,n)=1]}


The above summatory can be expressed with the aid of non completely multiplicative arithmetical funcions, using the fact that, some functions hold for inequalities similar to this one:

f(n \cdot m)  f(n) \cdot f(m); if gcd(n,m)\neq 1

And that also hold for the properties that any multiplicative function has:

f(n)> 0

f(n \cdot m) = f(n) \cdot f(m); if gcd(n,m)= 1


\phi(n)=\sum_{i=1}^{n}{\bigg\lfloor \frac{ f(i \cdot n)}{ f(i)\cdot f(n)}\bigg\rfloor}

And applying this idea to arithmetical functions of common use, we can give, for the divisor sigma functions, the Piltz divisor functions and the squarefree kernel [4], respectively:

\phi(n)=\sum_{i=1}^{n}{\bigg\lfloor \frac{\sigma_{k}(i \cdot n)}{\sigma_{k}(i)\cdot \sigma_{k}(n)}\bigg\rfloor}

\phi(n)=\sum_{i=1}^{n}{\bigg\lfloor \frac{\tau_{k}(i \cdot n)}{\tau_{k}(i)\cdot \tau_{k}(n)}\bigg\rfloor}

\phi(n)=\sum_{i=1}^{n}{\bigg\lfloor \frac{rad(i \cdot n)}{rad(i)\cdot rad(n)}\bigg\rfloor}

Or we can construct an implicit formula for the Totient function:

\phi(n)=\sum_{i=1}^{n}{\bigg\lfloor \frac {\phi(i)\cdot \phi(n)}{\phi(i \cdot n)}\bigg\rfloor}

But now we must take care that now:

f(n \cdot m) > f(n) \cdot f(m); if gcd(n,m)\neq 1

so we must invert the fraction inside the floor function.


The same thing can be done with additive but not completely additive functions:

\phi(n)=\sum_{i=1}^{n}{\bigg\lfloor \frac{\omega(i \cdot n)}{\omega(i) + \omega(n)}\bigg\rfloor} \; (n>1)


This way of constructing new formulas, seems to be trivial and useless, but this is only an excuse to show how works the characteristic or indicator functions, that are underneath the behaviour of the arithmetical functions, and thus the basic Set Theory inside Number Theory.

And of course we can extend this collection of formulas to other functions distinct than \phi, like for example \pi the Prime Counting Function:

\pi(n)=\sum_{i=2}^{n}{\bigg\lfloor \frac{i+1}{\sigma_{1}(i)}\bigg\rfloor} \; (n>1)

\pi(n)=\sum_{i=2}^{n}{\bigg\lfloor \frac{\phi(i)}{i-1}\bigg\rfloor} \; (n>1)

\pi(n)=\sum_{i=2}^{n}{\bigg\lfloor \frac{2}{\tau(i)}\bigg\rfloor}=\sum_{i=2}^{n}{\bigg\lfloor \frac{k}{\tau_{k}(i)}\bigg\rfloor} \; (n>1)

[a]-071210-Totient Carnival.nb


[1]-Peter Luschny – OEIS-Wiki: Sequences related to Euler’s totient function.
[2]- N. J. A. Sloane, The On-Line Encyclopedia of Integer Sequences.
A000720: pi(n), the number of primes <= n. Sometimes called PrimePi(n) to distinguish it from the number 3.14159…
[3]- N. J. A. Sloane, The On-Line Encyclopedia of Integer Sequences.
A000010: Euler totient function phi(n): count numbers <= n and prime to n.
[4]- R. Muller, The On-Line Encyclopedia of Integer Sequences.
A007947: Largest squarefree number dividing n (the squarefree kernel of n)


13 05 2010

If F_{n} is the nth Fibonacci Number then:

\displaystyle \sum_{i=0}^{n}{i \cdot F_{2i}} = n \cdot F_{2n+1} - F_{2n}

This identity can be easily proved using the method of induction with the basic recurrence relation of Fibonacci Numbers.

How can we find methods for constructing new identities like this one?


[1]-Wikipedia – Fibonacci number
[2]-Chandra, Pravin and Weisstein, Eric W. “Fibonacci Number.” From MathWorld–A Wolfram Web Resource – http://mathworld.wolfram.com/FibonacciNumber.html


14 02 2010

I’ve been programming a small web application in PHP to get automatically the BibTeX citation of any sequence in the The On-Line Encyclopedia of Integer Sequences.

If you follow this link: OEIS2BibTeX or just click on the above image, then you must enter the desired sequence ID to get the BibTeX citation data, that you can easily copy to your .bib file.

As I begun to learn PHP yesterday´s evening, and this is my first PHP programming, you can guess that this code must have more than one bug.

The citation is done using the @MISC BibTeX entry, that uses as Required fields: none, and as Optional fields: AUTHOR, TITLE, HOWPUBLISHED, MONTH, YEAR, NOTE.

The AUTHOR field contains the OEIS Sequence Author.

HOWPUBLISHED contains the url to the sequence in the OEIS Wiki, and it is assumed to be used with the \LaTeX hyperref packages

MONTH and YEAR are not yet used, and the field NOTE includes the Description of the sequence.

If this small application is used in combination with the BibTeX2HTML it is very fast to reuse the same bibliography data in your web, or in your \LaTeX document.

All the PHP archives can be downloaded and changed if desired.

The reference [1] is an example of how does the Plain format works.

References and Archives:
[1] Clark Kimberling. The On-Line Encyclopedia of Integer Sequences. A045051. Numbers n with property that in base 4 representation the numbers of 0’s and 2’s are 2 and 4, respectively.
[2] Andrew Roberts. Bibtex entry and field types.
[3] Psychedelic Geometry.PHP file. OEIS2BibTeX.php.
[4] Psychedelic Geometry.PHP file. default.php, feb 2010.
[5] Psychedelic Geometry. OEIS2BibTeX web site. http://www.oeis2bibtex.netai.net/, feb 2010.


17 01 2010


Our contributor Raymond Rogers has sent an alternate proof for:

\displaystyle det{\bigg[  \binom{i+j+k}{i} \bigg]}_{0\leq i,j \leq n} =\binom{n+k+1}{k+1}

This expression is identical to the one found in the post Binomial Matrix (III), but here the matrices are indexed from zero instead of one.

The proof is entitled A BINOMIAL DETERMINATE,A VERY SHORT PLAY IN THREE ACTS, and it is based on Vandermonde’s identity.

Thank you Raymond.


[1]-Raymond Rogers, Lamm´s Equation, Confluent Hypergeometric Equations- Lamm´s Equation Blogspot


9 01 2010


The Bisection Method is a very well known root-finding algorithm that always comes at the very beginning of every book on Numerical Analysis.

The algorithmn searches for a root in the interval, [a_{0},b_{0}] in whose endpoints the continous problem function, f(x), takes opposite signs:


The Bisection Method is based on Bolzano´s Intermediate Value Theorem, and it can give, also, an alternative proof for it. (Reference [1])

Here, it does not matter the function values: The algorithm does not use any other information from f(x), other than its sign changes.

There are excelent pages on the internet that treat this topic, (references [1], [2] and [3] for example), and it would be useless to add more redundant and, for sure, worse presented summary about this numerical method.

I just want to take out something hidden inside the computer software, a small piece of math inside the programming area.


The core of the Bisection Method is the conditional IF… THEN… sentence, where the algorithm chooses in which half of the interval is the desired root.

This conditional evaluation can be converted into a decision function, Let´s say \delta_i, that gives 0 if the root is on the left half interval and 1, otherwise.

Now the iterative sequence can be written using this function, \delta_i, where:

m_{i} is the midpoint of the search interval:

\displaystyle m_{i}=\frac{a_{i}+b_{i}}{2}

\delta_{i} is the decision function, and the \delta(i,j), in the second member, is the Kronecker´s delta:



\delta_{i} = \left\{ \begin{array}{ll} 1 & \mbox{if } (sgn(f(m_{i})=sgn(f(a_{i})) \\\\ 0 & \mbox{if } (sgn(f(m_{i})\neq sgn(f(a_{i})) \end{array}\right\}

The endpoints of the search interval must be:

{[a_{i+1}, b_{i+1}]} = \left\{ \begin{array}{ll} {[m_{i},b_{i}]} & \mbox{if }(\delta_{i}=0) \\\\ {[a_{i},m_{i}]} & \mbox{if } (\delta_{i}=1) \end{array}\right\}

Then, they can be expressed with the aid of \delta_{i}, as:

a_{i+1}=a_{i}+\delta_{i}\cdot (m_{i}-a_{i})

b_{i+1}=b_{i}+(1-\delta_{i})\cdot (m_{i}-b_{i})

If f(x), has only a single root in the interval [a_{0},b_{0}], then it is possible to use an alternate version of the decision function:


with the advantage that then it is not necessary to evaluate f(a_{i}) in the main loop of the algorithm: this implies an improvement in performance.


We can name the ratio of lengths between the intervals [a_{0},a_{i}], and [a_{0},b_{0}], as the parameter:

\displaystyle \theta_{i}=\frac{a_{i}-a_{0}}{b_{0}-a_{0}}

If \theta_{i} is expressed in function of \delta_{i}:

\displaystyle\theta_{i}=\sum_{k=0}^{i-1} \frac{\delta_{k}}{2^{k+1}}

The sequence formed by the distinct values of the decision function, \delta_{i}, matches up with the binary expansion (or the binary digits) of \theta_{i}

Then the midpoint and the endpoints of the interval in function of \theta_{i}, are:

a_{i}=a_{0}+(b_{0}-a_{0})\cdot \theta_{i}

\displaystyle m_{i}=a_{0}+(b_{0}-a_{0})\cdot \left(\theta_{i}+\frac{1}{2^{i+1}}\right)

\displaystyle b_{i}=a_{0}+(b_{0}-a_{0})\cdot \left(\theta_{i}+\frac{1}{2^{i}}\right)


The connection between \delta_{i} and \theta_{i} can be used to convert the Bisection Method into a method for finding the binary expansion for a root of any function that holds the conditions that this method demands.

For example if we take:

f(x)=x^2-x_{0}, where x_{0}>0

with a_{0}=0 and b_{0}=2^{k}, where 2^{k-1} < \sqrt{x_{0}} < 2^{k}, then:

\displaystyle \sqrt{x_{0}}=\lim_{i \to +\infty}{\theta_{i}}

and the sequence of \delta_{i} gives the binary digits of \sqrt{x_{0}}

[a]-010910-Binary Bisection.nb


[1]-Mohamed A. Khamsi, Helmut Knaust – SOSMATH – The Bisection Method
[2]-John H. Mathews – California State Univ. Fullerton – Module for The Bisection Method
[3]-Holistic Numerical Methods Institute- - Bisection Method: Nonlinear Equations


Get every new post delivered to your Inbox.