mersenneforum.org  

Go Back   mersenneforum.org > Great Internet Mersenne Prime Search > Math

Reply
 
Thread Tools
Old 2012-08-17, 16:17   #1
blistervol
 
Aug 2012

2×3 Posts
Default is 2^n + 3^m a prime

I have written a C# code to find all the values of 2^m + 3^n and interestingly half of the first 76 primes were of the form 2^m + 3^n I did further research and realized that I should exclude all the combinations of m and n where the last digit would be a 5 for the resulting sum of 2^n and 3^m. specifically the last digit would be a 5 for the combinations where m is of form 4p and n is of form 4p+2 and (4p+1,4p+1) , (4p+2,4p+1) and (4p+3,4p+3). That is 4 combinations out of 16 possible combinations for the values of m and n. which leaves us 12 combinations possible for calculating the value of 2^m + 3^n which have a high probability to be a prime number.
I have also contemplated the possibility for the use of ternary number system to see if a relation exists for ternary numbers and decimal prime numbers, in vain. Please give me your thoughts on this
blistervol is offline   Reply With Quote
Old 2012-08-17, 21:24   #2
Jens K Andersen
 
Jens K Andersen's Avatar
 
Feb 2006
Denmark

2·5·23 Posts
Default

Quote:
Originally Posted by blistervol View Post
half of the first 76 primes were of the form 2^m + 3^n
I don't know what you mean here. The 76th prime is 383.
26 of the first 76 primes can be written on the form 2^m + 3^n:
2, 3, 5, 7, 11, 13, 17, 19, 29, 31, 41, 43, 59, 67, 73, 83, 89, 97, 113, 131, 137, 251, 257, 283, 307, 337

Quote:
Originally Posted by blistervol View Post
have a high probability to be a prime number
It doesn't look higher than similar random numbers.
A random number x has chance around 1/log(x) of being prime, where log is the natural logarithm.
Let's only consider positive m and n for simplicity. Then 2^m+3^n is never divisible by 2 or 3. You additionally exclude cases where it's divisible by 5.
If a random number x is not divisible by 2, 3 or 5 then the chance of primality increases by a factor 2/1 * 3/2 * 5/4 = 3.75, so it becomes 3.75/log(x).

For m and n in [1..1000] PARI/GP counts 6321 prp's of form x = 2^m+3^n. If we estimate that each of the numbers not divisible by 5 has chance 3.75/log(x) of primality then the expected number of primes is 6269. That's within 1% of the actual number.

http://oeis.org/A004051 has a link to the first 1000 primes of your form.

Here are some gigantic prp's:
3^m+2
3^m+2^n (currently they all have n = m+/-1 but that's just because somebody chose to search that form)
2^n+3
Jens K Andersen is offline   Reply With Quote
Old 2012-08-18, 00:13   #3
blistervol
 
Aug 2012

2·3 Posts
Default Thank you for pointing me to that website.

Quote:
Originally Posted by Jens K Andersen View Post
Here are some gigantic prp's:
3^m+2
3^m+2^n (currently they all have n = m+/-1 but that's just because somebody chose to search that form)
2^n+3
I will be using my code to try and find more PRPs with 2^m + 3^n
blistervol is offline   Reply With Quote
Old 2012-08-18, 18:59   #4
blistervol
 
Aug 2012

2·3 Posts
Default Update

I Realized I was such a noob for thinking C# is my answer for calculating all the primes of that PRP. It has a really short range for storing variables. I am looking for more softwares that can crunch really big numbers. Also, Someone suggested using a custom data type in C#. Any suggestions would be awesome. :) thank you
blistervol is offline   Reply With Quote
Old 2012-08-18, 19:18   #5
Batalov
 
Batalov's Avatar
 
"Serge"
Mar 2008
Phi(4,2^7658614+1)/2

224058 Posts
Default

Pari/gp is great for prototyping/hypothesis testing.
Batalov is offline   Reply With Quote
Old 2012-08-19, 15:59   #6
henryzz
Just call me Henry
 
henryzz's Avatar
 
"David"
Sep 2007
Cambridge (GMT/BST)

23×3×5×72 Posts
Default

Quote:
Originally Posted by blistervol View Post
I Realized I was such a noob for thinking C# is my answer for calculating all the primes of that PRP. It has a really short range for storing variables. I am looking for more softwares that can crunch really big numbers. Also, Someone suggested using a custom data type in C#. Any suggestions would be awesome. :) thank you
As long as you are using a relatively recent version of c#(3.0+ i think) you can add as a reference system.numerics which adds a number called a BigInteger.
henryzz is offline   Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
(M48) NEW MERSENNE PRIME! LARGEST PRIME NUMBER DISCOVERED! dabaichi News 571 2020-10-26 11:02
Twin Prime Days, Prime Day Clusters cuBerBruce Puzzles 3 2014-12-01 18:15
disk died, prime work lost forever? where to put prime? on SSD or HDD? emily PrimeNet 3 2013-03-01 05:49
Prime Cullen Prime, Rest in Peace hhh Prime Cullen Prime 4 2007-09-21 16:34
The 40th known Mersenne prime, 220996011-1 is not PRIME! illman-q Miscellaneous Math 33 2004-09-19 05:02

All times are UTC. The time now is 00:20.


Sat Jul 17 00:20:09 UTC 2021 up 49 days, 22:07, 1 user, load averages: 1.89, 1.67, 1.61

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.