5

I found the very well-written and interesting paper "Formulas for Primes" by Underwood Dudley (https://www.jstor.org/stable/2690261).

In this paper Dudley gives plenty of examples of totally useless formulas for finding primes and primality tests etc.

A few things are unclear to me and since I am no number theory expert, I thought maybe someone can explain them to me.

Question 1

On the very first page, Dudley cites a formula from 1895 which says that for an integer $n\geq2$ the expression

$$ \frac{e^{2\pi i(n-1)!/n}-1}{e^{-2\pi i/n}-1}$$

is $1$ if $n$ is prime and $0$ if $n$ is not prime.

The problem is that it is true for all numbers except $4$, where the expression evaluates to $1-i$ which is neither $1$ nor $0$. So, my question is: Why is he stating a wrong formula here?

My guess is that this is just a small mistake, but I do not know wether the original formula from 1895 was already wrong (I could not find the original source) and noone saw that which would be confusing since the counter-example $4$ is not so big. Probably, noone cared because usually you want primality tests only for big numbers and everyone knows that $4$ is composite.

Question 2

On the second page, Dudley says that for an integer $n>1$ the expression

$$ f(n)=\sin^2 \pi n + \sin^2\pi\left(\frac{1+(n-1)!}{n}\right)$$

is integer if and only if $n$ is prime. I believe that this is true but I do not understand why we need the first summand which is always zero. So, why did he include the first summand making this formula unnecessarily complicated?

Question 3

My last question is related to the second formula on the second page. Here, Dudley says the function $f$ can also be written as

$$ f(n)= \frac{\sin^2 \pi n}{(\pi n)^2(1-n^2)^2}\cdot \sum_{k=2}^\infty \frac{\pi n}{k \sin\pi n/k}.$$

This makes no sense whatsoever since now the factor $\sin^2 \pi n$ which is always zero is a factor in front making $f(n)$ always zero if $n$ is an integer. My question here is: Am I not seeing anything and the formula is correct or - if the formula is wrong - what was meant here?

I hope someone can help me. Many thanks in advance!

Gary
  • 36,640
Cosine
  • 422
  • 1
    Note that in the last formula, $\sin(\pi n/k)=0$ whenever $k\mid n$. You probably have to understand that formula as a limit as $n$ approaches a positive integer. – Gary Aug 07 '23 at 09:15
  • "The myth of no prime formula" - https://math.stackexchange.com/questions/940338/the-myth-of-no-prime-formula?rq=1 – user25406 Aug 07 '23 at 12:17
  • 1
    In 3 ... $f(n)$ has a removable discontinuity at $n=$ integer. So take limit for those values. When we merely substitute in $n=$ integer, we get $0$ in front, but also $0$ in some of the denominators inside the sum. So some of the terms are limits of the form $0/0$. – GEdgar Aug 07 '23 at 13:56
  • There ARE many prime formulas , but no USEFUL prime formula is known , a formula that would allow us to find new huge primes without much effort or even ever larger concrete primes. Such a formula is not only yet unknown , it almost surely does not exist. – Peter Aug 13 '23 at 08:30
  • Of course we can establish plenty of those useless prime formulas , but the merit to do this is debatable. – Peter Aug 13 '23 at 08:32

2 Answers2

5

It is easier to respond to questions like these if you limit yourself to one question per post :)

Re 1, the $n = 4$ case was omitted perhaps because Dudley was quoting Dickson, who also omitted it. As you note, it is fairly common to omit small counterexamples when they are the only counterexamples (it is also possible that Dudley and/or Dickson did not notice the small counterexample). The original source, H. Laurent in Comptes Rendus vol. 126 (1898), pp. 809-810, does include the restriction $n > 4$. See http://gallica.bnf.fr/ark:/12148/bpt6k3082d/f809.item (a direct link to the relevant page).

Re question 2, Dudley is specializing a slightly more complicated statement in Dickson (which is itself a summary of a paper that Dickson is only loosely describing), and maybe Dudley is just not realizing that it does indeed simplify further. You can see the original in page 428 of Dickson, which is also out of (at least US) copyright and available freely at https://archive.org/details/historyoftheoryo01dick. While Dudley's oversight does make the formula more complicated than it could be, one broader point of Dudley's paper seems to be that it is easy to produce "formulas for prime numbers" if you don't specify many restrictions on what a "formula" can be or otherwise care about what your "formula" might look like (the two examples discussed in this answer, for example, seem to be putting fairly accessible facts about divisors of factorials in very complicated dress as "formulas"). In this context, the overly esoteric appearance of the formula may (unintentionally?) support Dudley's point.

  • Thank you for your answer! And for the links to the original articles in particular, thank you. And you are right about not having too many questions in one post, I will try to think of that in the future! In this spirit, I will accept your answer although it did not address the last question :) – Cosine Aug 07 '23 at 13:13
  • 1
    I just realized that Dudley probably made a copying mistake as the sum in the third formula was a product in Dickson's original paper... And then I guess that this - together with @Gary's remark to think of this as a limit could be the solution to Question 3. – Cosine Aug 07 '23 at 13:15
2

The other answer made everything clear. I will just add why the formula in your second question holds (I will go over the second summand, since the first is always $0$, as you stated): $$ f(n)=\sin^2\pi\left(\frac{1+(n-1)!}{n}\right)$$ This needs to be an integer. It can be only $0$ or $1$, because the only integer values of $\text{sin}(\theta)$ for $\theta\in\mathbb{R}$ are $0$ and $\pm1$. What this implies, is that $$g(n)=\frac{1+(n-1)!}{n}$$ is an integer or a half-integer. It can be a half-integer, if the denominator is even, but it's possible only for $n=2$ - the only even prime. And $g(2)=1\in \mathbb{N}$, so we want to prove that for all prime $n$-s $g(n)\in\mathbb{N}$, which would imply $f(n)=0$.

By Wilson's theorem we have that for all primes $n$: $(n-1)!\equiv-1(\text{mod }n)$. An equivalent statement of it is: There exists an integer $x$, such that $(n-1)!=nx-1$. After rearrangement you get that $$x=\frac{1+(n-1)!}{n}=g(n)\in\mathbb{N}.$$ The reverse statement is prooved in the same way, just with the steps in reversed order.