2
$\begingroup$

Is this a valid test for prime numbers?

$$ \prod_{k=2}^{\lceil \sqrt{n} \rceil} \sin(\pi n/k) \neq 0 \quad \text{if } n \text{ is prime} $$

It uses a product of sines to test whether a number is divisible by an integer, if it is the product is zero, if not the number must be prime.

$\endgroup$
  • $\begingroup$ If you put in a link to the image, a higher-rep user could edit the question so that the picture shows. $\endgroup$ – Omnomnomnom Apr 24 '17 at 0:25
  • $\begingroup$ @Omnomnomnom Oops, I didn't mean to over write that... $\endgroup$ – John Doe Apr 24 '17 at 0:30
  • $\begingroup$ Actually, its good, thanks :) $\endgroup$ – Jack Apr 24 '17 at 0:31
  • $\begingroup$ well, I thought I would edit too, put it back to @Omnomnomnom, except changed floor to ceiling, as this is what the picture suggests (and I don't know which would be correct). $\endgroup$ – Mirko Apr 24 '17 at 0:32
  • $\begingroup$ Well, I'm glad everything is in order. For future reference, here's a quick guide to mathematical typesetting on this site. $\endgroup$ – Omnomnomnom Apr 24 '17 at 0:34
0
$\begingroup$

Hint: there is a formula for primes based on sines, probably the theoretical base of yours is another way of writing it. It is based on Wilson's theorem:

$\displaystyle f(j)=\frac{\sin^2\left(\pi\frac{(j-1)!^2}{j}\right)}{\sin^2\left(\frac{\pi}{j}\right)} \cdot j$

So if you run a loop it should provide the list of primes and $0$'s as follows:

$[1,2,3,4,5,6,7,8,9,10,11...] \to [0,2,3,0,5,0,7,0,0,0,11...]$

More information in this previous question.

$\endgroup$
  • 1
    $\begingroup$ Well I've actually never heard of Wilson's Theorem, I came up with this test myself, I was basing it off of the intersections of z=sin(pi*x/floor(y)) with z=0. $\endgroup$ – Jack Apr 24 '17 at 0:39
  • $\begingroup$ @Jack that is cool, then have a look to it: reading the classical topics of number theory might give you even more ideas. Sometimes one's intuition is a good starting point, like in your case, if you join that intuition with the already known theory, it will give you more ideas for sure. At least it will no be bad for you, it will enrich your personal research. $\endgroup$ – iadvd Apr 24 '17 at 0:43
  • $\begingroup$ I thought it was cool too, I just wanted to know about this because I have an idea which uses sines to map prime numbers as poles, each one depends on the previous ones, but I suspect there is a way to circumvent the recursive behavior $\endgroup$ – Jack Apr 24 '17 at 2:21
  • $\begingroup$ @Jack just in case: have you tested your formula with a programming language? does it hold for big $n$? $\endgroup$ – iadvd Apr 24 '17 at 2:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.