![]() |
|
|
#1 |
|
May 2004
New York City
5·7·112 Posts |
Find reversible prime p (with prime digit reversal p')
such that p*p' = n^2 +/- d for d = 1 or 2 (and integer n). (I don't know how easy or hard this is.) |
|
|
|
|
|
#2 |
|
"Ben"
Feb 2007
7·503 Posts |
A quick program to check all possibilities up to p < 65536 gave two results:
Code:
41,14,574,575,576... is square! 33029,92033,3039757957,3039757958,3039757959,3039757956... is square! and p = 33029 gives 33029*92033 = 55134^2 + 1 I'll extend this up to p < 2^32 here in a sec... - ben. |
|
|
|
|
|
#3 |
|
"Ben"
Feb 2007
7×503 Posts |
For all primes p < 4e9, I only found one more unique result...
Code:
Tue Jun 03 2008 15:07:04 v0.9.14, Initializing (x86-64 asm)... Tue Jun 03 2008 15:07:04 v0.9.14, cached 664581 primes. pmax = 10000079 >> Welcome to YAFU (Yet Another Factoring Utility) >> Type help at any time, or quit to quit >> puzzle(4000000000) 41*14 = 24^2 - 2 33029*92033 = 55134^2 + 1 92033*33029 = 55134^2 + 1 2086361*1636802 = 1847961^2 + 1 Elapsed time = 316.8500 seconds. ![]() Clearly, something other than brute force would be necessary to extend this much further, but I haven't come up with a simpler way. [edit] just found a bug in my code... stay tuned. [edit2] bug fixed, found one more: Code:
2800581281*1821850082 = 2258813679^2 - 1 Last fiddled with by bsquared on 2008-06-03 at 20:26 |
|
|
|
|
|
#4 | |
|
May 2004
New York City
5·7·112 Posts |
Quote:
is what the problem intended (any number can be reversed, of course). So you're solving the more general problem. Also, the OP was asking for a solution for each of the four cases: +/- 1,2. So I think you've shown there aren't any small ones for the other cases. |
|
|
|
|
|
|
#5 | |
|
"Ben"
Feb 2007
67018 Posts |
Quote:
. I took p to be prime but p' doesn't have to be.I checked for each of the four cases for each prime p, so yes assuming the code is correct then there aren't any small ones for +2. I just made my isSquare routine faster. The "All p < 4e9" test is now 4x faster. So thanks, davar55, for giving me an excuse to drag my code back out and improve it! - ben. |
|
|
|
|
|
|
#6 |
|
(loop (#_fork))
Feb 2006
Cambridge, England
642410 Posts |
Code:
2800581281*1821850082 = 2258813679^2 - 1 |
|
|
|
|
|
#7 |
|
"Ben"
Feb 2007
352110 Posts |
|
|
|
|
|
|
#8 |
|
Undefined
"The unspeakable one"
Jun 2006
My evil lair
2×11×283 Posts |
|
|
|
|
|
|
#9 |
|
May 2004
New York City
102138 Posts |
Finding primes reversible in other bases that have the desired property
is a reasonable extension of the problem beyond what was intended. Is it likely that every base even has such solutions? |
|
|
|
|
|
#10 |
|
"Ben"
Feb 2007
1101110000012 Posts |
All p < 100e9, nothing new. Extending it that far took a couple hours of run time after some improvements to the code.
|
|
|
|
|
|
#11 | |
|
"Ben"
Feb 2007
7·503 Posts |
Quote:
in octal, I get 4 results, none reversible, all of the +1 variant, p < 4e9 other bases are not as straightforward... I need to go write a general base conversion utility, I guess. |
|
|
|
|
![]() |
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Mersenne Primes p which are in a set of twin primes is finite? | carpetpool | Miscellaneous Math | 3 | 2017-08-10 13:47 |
| Distribution of Mersenne primes before and after couples of primes found | emily | Math | 34 | 2017-07-16 18:44 |
| Conjecture about Mersenne primes and non-primes v2 | Mickey1 | Miscellaneous Math | 1 | 2013-05-30 12:32 |
| A conjecture about Mersenne primes and non-primes | Unregistered | Information & Answers | 0 | 2011-01-31 15:41 |
| possible primes (real primes & poss.prime products) | troels munkner | Miscellaneous Math | 4 | 2006-06-02 08:35 |