11

I constructed this cosine sum that puts all primes within N on line y=1, and its zeros show the sieve by primes less than N. For $x<N^2$, they are all primes. $$ P(N,x)=\sum_{n=2}^{N}\frac{1}{n}\left(1+2\sum_{k=1}^{n-1}(1-\frac{k}{n})\cos\frac{2k\pi}{n}x\right) $$ And here's an example of $P(50,x)$, and I've created a live graph for you to play as experiment. enter image description here

Questions:

  • Why this function has this property?
  • Is it a periodic function? What's the period?
Fred Yang
  • 665
  • 4
    Hint: this function shows the number of divisors of $x$ less than $N$ – Fred Yang Apr 23 '16 at 15:00
  • I created a live graph for you to play experiment. https://www.desmos.com/calculator/7a6rvlzrsh – Fred Yang Apr 23 '16 at 15:13
  • It looks like the the period is the primorial of the highest prime lower than or equal to $N$ doubled. For instance: $n=5$, period = 60. $N=7$, period = 240 – Mastrem Apr 23 '16 at 21:58
  • with 240 I meant 420 – Mastrem Apr 23 '16 at 22:55
  • You are on right direction, and your numbers are right for your examples because there's only one prime power 4, but in general it's not simply doubled. Test $N=10$ and you'll see. – Fred Yang Apr 23 '16 at 23:24
  • 2
    $\operatorname{lcm}(2,3,\dotsc,N)$ is a period of $p(N,,\cdot,)$, probably (I'm almost sure, but I leave me some wiggle room) it's the smallest positive period. – Daniel Fischer Apr 24 '16 at 14:06
  • Please refer to another question http://math.stackexchange.com/questions/1759629/is-there-a-closed-form-formula-for-sum-k-2n-left-frac-sin-x-sin-fracx. I found these two are identical functions but haven't worked out the proof of the identify. Great if somebody can help. – Fred Yang Apr 26 '16 at 15:51

1 Answers1

2

We will first show (with some help from my office-mate) that the function $P(m,x)$ is equal to the function: $$f_m(x)=\sum_{k=2}^m \frac{1}{k^2}\left(\frac{\sin(\pi x)}{\sin(\pi x/k)}\right)^2$$ In order to do this, we first recall the exponential sum formula: $$\sum_{j=-n}^{n}\exp(inx)=\exp\left(\frac{-inx}{2}\right)\frac{\sin(\frac{1}{2}(n+1)x)}{\sin(\frac{1}{2}x)}$$ From this formula (a commonly known formula in any book dealing with exponential sums), we obtain: $$\sum_{k=2}^m \frac{1}{k^2}\left(\frac{\sin(\pi x)}{\sin(\pi x/k)}\right)^2=\sum_{k=2}^m \frac{1}{k^2}\left(\sum_{j=1-k}^{k-1}\exp(ij\frac{2\pi x}{k})\right)^2$$ $$=\sum_{k=2}^m\frac{1}{k^2}\sum_{j=1-k}^{k-1}\sum_{t=1-k}^{k-1}\exp(i\frac{2\pi x}{k}(j+t))$$ Writing this out using sines and cosines: $$=\sum_{k=2}^m\frac{1}{k^2}\sum_{j=1-k}^{k-1}\sum_{t=1-k}^{k-1}\left[\cos\left(\frac{2\pi x}{k}(j+t)\right)+i\sin\left(\frac{2\pi x}{k}(j+t)\right)\right]$$

Notice that cosine is an even function so the cosine terms with $j+t>0$ and $-j-t$ may be combined to give $2\cos(\cdot\cdot\cdot)$ while sine being an odd function implies that the $j+t>0$ and $-j-t<0$ contributions will cancel. Thus, we may rewrite our formula as: $$=\sum_{k=2}^m\frac{1}{k^2}\left[\sum_{j+t=0}\cos\left(\frac{2\pi x}{k}(j+t)\right)+2\sum_{j+t>0}\cos\left(\frac{2\pi x}{k}(j+t)\right)\right]$$ where $1-k\leq j,t\leq k-1$ in the above summations. A simple counting argument for when different values of $j+t$ are equal then gives: $$=\sum_{k=2}^m\frac{1}{k^2}\left[k+2\sum_{j=1}^{k-1}(k-j)\cos\left(\frac{2\pi xj}{k}\right)\right]$$ and multiplying through by one of the factors of $\frac{1}{k}$ therefore indeed gives $f_m(x)=P(m,x)$.

Now, we will apply this useful identity to analyze the function:

If $x$ is an integer, then $\sin(\pi x/k)$ will be zero exactly when $k|x$, and $\lim_{x\to kt}\left(\frac{\sin(\pi x)}{\sin(\pi x/k)}\right)^2=k^2$, where $t\in\mathbb{Z}$. Every other term with $k\nmid x$ ($x$ still an integer) will have $\sin(\pi x)=0$ and $\sin(\pi x/k)$ nonzero. That is, for $x$ an integer, the only non-zero contributions come from divisors of $x$, and each of these will contribute $\frac{1}{k^2}\cdot k^2=1$. So, $f_m(x)$ gives the number of distinct divisors of $x$ which lie in between $2$ and $m$. This is why for $x$ a prime number between $2$ and $m$, the function gives $1$; for $x$ a prime number between $m$ and $m^2$, the function gives $0$; and why the function acts as a prime sieve for $x$ larger than $m^2$.

In this form, it is fairly easy to see that the period of $f_m(x)$, as it is the sum of these $\sin$ terms, is $\operatorname{lcm}(2,3,...,m)$.

Ben Sheller
  • 4,155
  • thanks for the answer, which is very helpful. But I have difficulty to prove the identify between the $f_m(x)$ cited here and the function I constructed above. Can you shed light on it or direct me to a reading source? – Fred Yang Apr 26 '16 at 21:57
  • Proving the identity seems to come down to showing that $\frac{1}{m}(1+2\sum_{j=1}^{m-1}(1-j/m)\cos(2\pi j/m))=\frac{1}{m^2}\left(\frac{\sin(\pi x)}{\sin(\pi x/m)}\right)^2$, which is hopefully some known trigonometric identity. At least in the case $m=2$ it is easy to show directly, and I've been thinking a little about attempting some sort of induction argument, but I have not had the time to get anywhere much with it yet. – Ben Sheller Apr 27 '16 at 03:38
  • @FredYang I have added a proof of that identity. – Ben Sheller Apr 27 '16 at 21:20
  • this is a very beautiful answer. Thank you and your friend very much for working this out! – Fred Yang Apr 28 '16 at 05:05