# Functions and derivatives with rational and irrational values at the integers

The function $f(x) = \cos (\pi x)$ is interesting in that it takes rational values (integers) at the integers, its derivative $f'(x) = -\pi \sin (\pi x)$ also takes rational values (zero) at the integers, but its second derivative $f''(x) = -\pi^2 \cos (\pi x)$ takes irrational values at the integers. Clearly its higher derivatives alternate between taking rational (zero) and irrational values at the integers.

My question is this: Does there exist an analytic function taking rational values at the integers, whose derivative also takes rational values at the integers, but whose second and higher derivatives take irrational values at the integers?

• So far I can only manage at the positive integers. – André Nicolas Apr 10 '14 at 17:13
• My best find so far is analytic $f$ with $f(x)\in\mathbb Q$ for $x\in \mathbb Z$; $f'(x)\in\mathbb Q$ for $x\in \mathbb Z$; $f^{(n)}(x)\notin \mathbb Q$ for $n\ge 2$ and $x\in\mathbb Z\setminus\{0\}$. I use $f(x)=\frac{\sin(\pi x)}{\pi x}$. - But I supsect that $f(x)+f(x+1)$ looks good. – Hagen von Eitzen Apr 10 '14 at 17:15
• Thank you Hagen and André. André, do you have an example at the positive integers that is different from Hagen's examples? Further, are there any examples of such functions not based on the sine and cosine functions? – Geoffrey Caveney Apr 10 '14 at 17:27
• Actually @HagenvonEitzen , when I compute the second derivative of your function, I still get rational values at the integers: the $\pi$ factor only appears in the $\sin (\pi x)$ terms which are zero so it vanishes; the $\cos (\pi x)$ terms only have the factor $-1/x^2$ so they are still rational. – Geoffrey Caveney Apr 10 '14 at 17:55
• @HagenvonEitzen Thank you for the follow-up. Can you make rigorous your comment that "exponentials and logs inherently are 'too transcendental'"? Here is the point: The Gamma function takes rational values (integers) at the positive integers, but we do not know about its derivative because it depends on the irrationality of Euler's constant gamma, which is still unknown! But higher derivatives take irrational values, being based on zeta(2), zeta(3), etc. If gamma were rational, the Gamma function would answer my question. If there is no answer to my question, it implies gamma is irrational. – Geoffrey Caveney Apr 13 '14 at 15:45

The simplest example I can think of is $$f(x) = \cos(\pi x) + \sin^3(\pi x)$$ For the purpose of verification, it helps to rewrite $f$ as $$f(x) = \cos(\pi x) + \frac34 \sin(\pi x) - \frac14 \sin(3\pi x)$$ The first term has nonzero derivative at integer points only when $n$ is even. The two others have nonzero derivative at integer points only when $n$ is odd. Therefore, $f^{(n)}$, evaluated at integer points, is $$\begin{cases} \pm \pi^n \quad & \text{n is even} \\ \\ \pm \dfrac{3^n-3}{4}\pi^n \quad & \text{n is odd} \end{cases} \tag{1}$$ Clearly, (1) is rational for $n=0,1$ and irrational for all $n\ge 2$.
As an aside, the factor $\dfrac{3^n-3}{4}$ is an integer for every odd $n$.