mersenneforum.org  

Go Back   mersenneforum.org > Extra Stuff > Miscellaneous Math

Reply
 
Thread Tools
Old 2018-09-26, 10:33   #1
Godzilla
 
Godzilla's Avatar
 
May 2016

2·34 Posts
Default Is this (prime numbers) formula known ?

Good morning,

Is this formula known? does it work or does it not work?

The formula is :

((p^1*p^2)+(p^2 or p^1))-1 = prime number

Thank you.


.
Godzilla is offline   Reply With Quote
Old 2018-09-26, 10:47   #2
retina
Undefined
 
retina's Avatar
 
"The unspeakable one"
Jun 2006
My evil lair

611510 Posts
Default

Quote:
Originally Posted by Godzilla View Post
Good morning,

Is this formula known? does it work or does it not work?

The formula is :

((p^1*p^2)+(p^2 or p^1))-1 = prime number

Thank you.


.
Yes, it works perfectly.

p1=2, p2=13 ---> winner
retina is online now   Reply With Quote
Old 2018-09-26, 11:00   #3
Godzilla
 
Godzilla's Avatar
 
May 2016

16210 Posts
Default

Quote:
Originally Posted by retina View Post
Yes, it works perfectly.

p1=2, p2=13 ---> winner



and while p > 2 ?

Thanks

.
Godzilla is offline   Reply With Quote
Old 2018-09-26, 11:08   #4
retina
Undefined
 
retina's Avatar
 
"The unspeakable one"
Jun 2006
My evil lair

5×1,223 Posts
Default

Quote:
Originally Posted by Godzilla View Post
and while p > 2 ?

Thanks

.
You could also test it for yourself and find your own counter examples. Just a thought.
retina is online now   Reply With Quote
Old 2018-09-26, 11:16   #5
Godzilla
 
Godzilla's Avatar
 
May 2016

2·34 Posts
Default

Quote:
Originally Posted by retina View Post
You could also test it for yourself and find your own counter examples. Just a thought.


You forum members do you know or not if it works?


.
Godzilla is offline   Reply With Quote
Old 2018-09-26, 11:36   #6
Godzilla
 
Godzilla's Avatar
 
May 2016

2×34 Posts
Default

I found a counterexample that does not work.
Godzilla is offline   Reply With Quote
Old 2018-09-26, 13:50   #7
CRGreathouse
 
CRGreathouse's Avatar
 
Aug 2006

176116 Posts
Default

With the primes up to 10^5 this works 10240881 out of 91996872 times (about 11%).
CRGreathouse is offline   Reply With Quote
Old 2018-09-26, 13:57   #8
LaurV
Romulan Interpreter
 
LaurV's Avatar
 
Jun 2011
Thailand

33·347 Posts
Default

Quote:
Originally Posted by Godzilla View Post
I found a counterexample that does not work.
If you find a counterexample that works, you can get the Nobel prize...
LaurV is offline   Reply With Quote
Old 2018-09-26, 15:53   #9
CRGreathouse
 
CRGreathouse's Avatar
 
Aug 2006

32×5×7×19 Posts
Default

559526371/6161857506 for primes up to a million. (I'm done.)
CRGreathouse is offline   Reply With Quote
Old 2018-09-26, 18:25   #10
Dr Sardonicus
 
Dr Sardonicus's Avatar
 
Feb 2017
Nowhere

34·5·11 Posts
Default

I'm not sure what the or means [possibilities include the bitwise OR of p1 and p2, which in Pari-GP would be bitor(p1,p2)].

For the sake of discussion I will assume it means

p1*p2 + p1 - 1 or p1*p2 + p2 - 1.

It occurred to me that one could make both expressions divisible by the same prime q. This would require that p1 == p2 (mod q). Calling the common residue class x, we have

x^2 + x - 1 == 0 (mod q).

This quadratic has two solutions (mod q) when 5 is a quadratic residue (mod q), i.e. when q == 1 or 9 (mod 10). For q = 11, the two values of x are 3 (mod 11) and 7 (mod 11).

Thus, if p1 and p2 are both congruent to 3 (mod 11) or both are congruent to 7 (mod 11), both p1*p2 + p1 - 1 and p1*p2 + p2 - 1 will be divisible by 11.

For example, we could take p1 = 3 and p2 = 47, or p1 = 7 and p2 = 29.
Dr Sardonicus is offline   Reply With Quote
Old 2018-09-27, 02:23   #11
Dr Sardonicus
 
Dr Sardonicus's Avatar
 
Feb 2017
Nowhere

34×5×11 Posts
Default

I was thinking about the possibility that "p1 or p2" meant bitor(p1, p2), and noticed that, if 2 < p1 < p2, and 2^(r-1) < p1 < 2^r, then

bitor(p1,p2) = p2 when p2 == p1 (mod 2^r).

This would make the expression equal to

p2*(p1 + 1) - 1.

If q is a prime which does not divide p1 + 1, p1 + 1 has a multiplicative inverse (mod q), and the expression is divisible by q when p2 == (p1 + 1)-1 (mod q).

OK, so it's easy to construct counterexamples in which

bitor(p1,p2) = p2 and q divides p1*p2 + p2 - 1,

provided q does not divide p1 + 1.

Then, I noticed something curious. The first 2 odd primes are 3 and 5. The congruence classes 3 (mod 4) and 5 (mod 8) cover the congruence classes 3, 5, and 7 (mod 8). That only leaves the class 1 (mod 8) uncovered. So it occurred to me to wonder whether it ever does get covered by classes p1 (mod 2^r).

Since the first prime congruent to 1 (mod 8) is 17 and the next is 41, things start off badly. You need to cover 8 residue classes (mod 64) and only 3 of them (17, 49, and 41) are covered. That leaves 5 classes (mod 64). Make that 10 classes (mod 128).

You have to cover 1/4 of the odd residue classes (mod 2^r) for some r (those congruent to 1 (mod 8)), and the primes congruent to 1 (mod 8) are about a quarter of the primes, and the primes keep getting thinner on the ground. So I sort of doubt the class 1 (mod 8) ever gets covered.
Dr Sardonicus is offline   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
Is this new formula for Perfect Numbers useful? mahbel Miscellaneous Math 20 2017-03-01 22:41
Primal numbers formula militaria Miscellaneous Math 5 2016-01-10 20:24
Formula for cofactor for Fermat numbers. literka Factoring 7 2012-04-05 09:51
prime formula meeztamike Miscellaneous Math 11 2010-07-18 04:13
"prime numbers formula" crankery Mini-Geek Miscellaneous Math 12 2009-03-04 16:51

All times are UTC. The time now is 09:17.

Wed Apr 14 09:17:08 UTC 2021 up 6 days, 3:58, 0 users, load averages: 1.26, 1.63, 1.62

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.

This forum has received and complied with 0 (zero) government requests for information.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.
A copy of the license is included in the FAQ.