![]() |
|
|
#12 |
|
Just call me Henry
"David"
Sep 2007
Cambridge (GMT/BST)
10110111110002 Posts |
|
|
|
|
|
|
#13 |
|
"Ram Shanker"
May 2015
Delhi
2×19 Posts |
Ok, I figured out the bug in my python code. Can someone explain this to me.
After a certain number of digits, python results give incorrect division values. >>> int( 194216878433174216 / 10 ) % 10 0 >>> int( 19421687843317421 / 10 ) % 10 2 >>> int( 1942168784331742 / 10 ) % 10 4 >>> int( 19421687843317 / 10 ) % 10 1 >>> int( 1942168784331 / 10 ) % 10 3 >>> int( 194216878433 / 10 ) % 10 3 First result is wrong. Trying on my 64 bit Python 3.5.0 shell. Is it a bug in python interpreter or it's supposed to be this way only? It gives correct for high digit multiplication. >>> 194216878433174216 * 194216878433174216 37720195868326371910875197407214656 So obviously it can handle >64 bit numbers, but some problem at the boundary? Anyway I figured out a way for odd number and found both 15 digit ones. Now running for those 18 digit ones. :) Last fiddled with by ramshanker on 2016-03-18 at 15:05 |
|
|
|
|
|
#14 | |
|
Basketry That Evening!
"Bunslow the Bold"
Jun 2011
40<A<43 -89<O<-88
3·29·83 Posts |
Quote:
Code:
In [1]: 194216878433174216/10 Out[1]: 1.942168784331742e+16 In [2]: 19421687843317421/10 Out[2]: 1942168784331742.0 In [3]: 194216878433174216//10 Out[3]: 19421687843317421 Last fiddled with by Dubslow on 2016-03-18 at 16:03 |
|
|
|
|
|
|
#15 |
|
"Ram Shanker"
May 2015
Delhi
2×19 Posts |
Ok, found the 18 digit one.
![]() Run-time 5967.29 sec. Time to go for the big gun... any hint how many minimum digits for "**"?
|
|
|
|
|
|
#16 |
|
Sep 2014
29 Posts |
If my program did not miss any solutions, then there are 2 solutions with 21 digits. There seem to be no solutions with 19 or 20 or 22 digits.
Last fiddled with by Anonuser on 2016-03-18 at 20:51 |
|
|
|
|
|
#17 |
|
Just call me Henry
"David"
Sep 2007
Cambridge (GMT/BST)
16F816 Posts |
|
|
|
|
|
|
#18 |
|
"Ram Shanker"
May 2015
Delhi
1001102 Posts |
|
|
|
|
|
|
#19 | |
|
"Robert Gerbicz"
Oct 2005
Hungary
22·7·53 Posts |
The official solution (what is essentially my solution
) is out at: https://www.research.ibm.com/haifa/p...March2016.htmlI've updated the corresponding oeis sequence. Quote:
My timings in the low range: for n value, timing in thread time on my ancient core-i3 n=15: <1 second n=18: 2 seconds [to get *] n=21: 61 seconds (close to the famous 1 minute rule) [to get **] n<=30: 152 hours |
|
|
|
|
|
|
#20 | |
|
"Ram Shanker"
May 2015
Delhi
2×19 Posts |
Quote:
I wrote mine in python, an interpreted language, so I guess (wild guess) I could achieve at least 5 times improvement in run time with C code. However lost my interest after that lucky (early in the search sequence) 21 digit solution. My Python code managed ~140k candidate numbers per second. Last fiddled with by ramshanker on 2016-04-04 at 15:47 |
|
|
|
|
|
|
#21 | |
|
"Robert Gerbicz"
Oct 2005
Hungary
148410 Posts |
Yes, of course. Here I'm regularly posting solutions of the month puzzle (if I've solved).
Quote:
|
|
|
|
|
|
|
#22 |
|
"Robert Gerbicz"
Oct 2005
Hungary
22·7·53 Posts |
The next term is a(28)=42438303108538316396992097393368 found by Dieter Beckerle using my posted algorithm, but his own code. And there is no more term up to 10^32. The oeis sequence is updated, now it is in draft. (https://oeis.org/A269588).
ps. Note that here still k=3, so there is a speedup of 1000 over the classical approach. |
|
|
|
![]() |
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| March 2018 | Xyzzy | Puzzles | 2 | 2018-04-08 13:45 |
| March 2017 | R. Gerbicz | Puzzles | 1 | 2017-04-03 10:57 |
| March 2015 | Xyzzy | Puzzles | 15 | 2015-04-02 02:19 |
| March Madness 2006 | Prime95 | Lounge | 20 | 2006-03-21 04:35 |
| gmp 4.2 due in March | Mystwalker | GMP-ECM | 4 | 2006-02-01 12:00 |