mersenneforum.org some tools for weights computing...
 Register FAQ Search Today's Posts Mark Forums Read

2015-07-03, 11:02   #12
Thomas11

Feb 2003

36008 Posts

Quote:
 Originally Posted by pepi37 I search for this article and will say this "old" nash for 93*10^n-1 gives -93 10 5030 5045 "new" nash gives "only" -93 3116 3123 So what is correct ? Second: how to calculate nash weight from 1 to 1000 on base 3? mnash calculate only base 2, right? Thanks for answer
It seems that you mixed up those values:

The old Nash tool as given here in this thread was specifically created for k*2^n-1 and will yield:
Code:
nash 93    -->   93 3116 3123
But this is the Nash weight for the sequence 93*2^n-1

The new (universal) Nash tool (originally created upon your request) and given in another thread yields the correct answer:
Code:
nash -93 10   -->  -93 5030 5045
This is the Nash weight for the sequence 93*10^n-1

BTW.: Note the sign change between the two versions: For the new one enter negative k for the Riesel side, e.g. -k*b^n+1 for k*^b^n-1.

mnash is restricted to base 2. But one could easily write a little Python or Perl script which does the looping over k and calls the new Nash tool...

Last fiddled with by Thomas11 on 2015-07-03 at 11:03

2015-07-03, 12:17   #13
Thomas11

Feb 2003

27×3×5 Posts

Quote:
 Originally Posted by Thomas11 mnash is restricted to base 2.
I prepared a new version of mnash which is now also capable for bases other than b=2.
For convenience the attached ZIP file also contains the latest single k universal base nash.exe.

A positive k means k*b^n+1, negative k means k*b^n-1 (e.g. entering as -k*b^n+1)

Usage examples are given below:

Nash weights for sequences k*3^n-1 (for even k=10-20):
Code:
mnash -20 -10 2 3        (= kmin kmax kstep base)

-20 3 2960 2960
-18 3 2686 2667
-16 3 1430 1435
-14 3 1524 1523
-12 3 2359 2369
-10 3 4054 4038
Note the reversed order due to the negative k values. If base is omitted, b=2 is assumed.

and for k*7^n+1:
Code:
mnash 10 20 2 7

10 7 4000 3979
12 7 2407 2411
14 7    0    0
16 7 3211 3210
18 7 2392 2387
20 7    0    0
Nash weight for the single sequence 14*17^n-1:
Code:
nash -14 17

-14 17  803  800
Same here: If base is omitted, b=2 is assumed.
Attached Files
 allnash.zip (124.2 KB, 264 views)

Last fiddled with by Thomas11 on 2015-07-03 at 12:18

 2015-07-03, 13:51 #14 pepi37     Dec 2011 After milion nines:) 5FD16 Posts Mnash rules! Thanks so much!
2015-07-06, 08:15   #15
Thomas11

Feb 2003

27·3·5 Posts

I did some minor improvements to the "mnash" tool:

(1) The earlier version was restricted to k<2^31, the new one can handle k of arbitrary size.

(2) The values "kmin" and "kmax" now have the meaning of start and stop values and you're no longer restricted to (numerically) increasing order.

(3) The sign of the step size doesn't matter. It will be adjusted properly. So a step size of 2 may be entered as "2" oder "-2".

(4) If only kmin and kmax are given, a step size of 2 is assumed. And base=2, of course.

To give an example:
Code:
mnash -2 -10 2 13

-2 13 3721 3713
-4 13    0    0
-6 13 1416 1414
-8 13  963  965
-10 13    0    0
And for some very large Ks:
Code:
mnash 123456789012345678901234567890 123456789012345678901234567880 2 7

123456789012345678901234567890 7 3543 3571
123456789012345678901234567888 7 1370 1345
123456789012345678901234567886 7    0    0
123456789012345678901234567884 7 2876 2886
123456789012345678901234567882 7 2171 2148
123456789012345678901234567880 7    0    0
Attached Files
 allnash.zip (137.5 KB, 265 views)

 2015-12-24, 23:53 #16 pepi37     Dec 2011 After milion nines:) 3×7×73 Posts Can you make modification of this tool adding just one number 1 100 2 2 10 Last number means: print only K that have weight 10 or less.
2015-12-25, 09:55   #17
Thomas11

Feb 2003

27×3×5 Posts

Quote:
 Originally Posted by pepi37 Can you make modification of this tool adding just one number 1 100 2 2 10 Last number means: print only K that have weight 10 or less.
I will add this feature when I'm back from Christmas vacations (don't have a real computer with me)...

 2015-12-27, 22:04 #18 pepi37     Dec 2011 After milion nines:) 3·7·73 Posts Multi5 is still way faster then mnash. So also can you just change behavior of last number 32000000025 KMIN 32001000000 KMAX 30 KSTEP 600 minimum weight for printing Since if we use this tool we look at very small weight of number do that last number print only K less then not above then ( as it now) With that output will be drastically smaller . Thanks
2016-01-04, 12:43   #19
Thomas11

Feb 2003

36008 Posts

Quote:
 Originally Posted by pepi37 Can you make modification of this tool adding just one number 1 100 2 2 10 Last number means: print only K that have weight 10 or less.
Here comes the new version of MNash with the print filtering feature added.

Usage example:
Code:
MNash.exe -1 -100 2 2 800
The additional parameter (800) controls the printing, e.g. the result line will only be printed if at least one of the two weights is less or equal to the limiting parameter. The output of the above example is thus:
Code:
            -11 2  795  791
-29 2  495  485
-37 2  630  629
-43 2  633  640
-59 2  639  642
-71 2  593  604
-73 2  800  818
If looking for high weight sequences just enter the limit with a negative sign, e.g.:
Code:
MNash.exe -1 -100 2 2 -3000
This will print only lines with weight >= 3000:
Code:
            -45 2 3747 3767
-69 2 3438 3437
-75 2 3181 3184
Attached Files
 allnash.zip (137.7 KB, 309 views)

 2020-07-17, 20:53 #20 sweety439     "99(4^34019)99 palind" Nov 2016 (P^81993)SZ base 36 3,467 Posts I typed "nash 127" It prints "127 325 332" Thus the weight of 127*2^n+1 is 325 and the weight of 127*2^n-1 is 332?
2020-07-17, 21:01   #21
pepi37

Dec 2011
After milion nines:)

3·7·73 Posts

Quote:
 Originally Posted by sweety439 I typed "nash 127" It prints "127 325 332" Thus the weight of 127*2^n+1 is 325 and the weight of 127*2^n-1 is 332?

nash 127 means nash 127 2 (plus side)
nash -127 means nash 127 2 ( minus side)

2020-07-17, 21:06   #22
sweety439

"99(4^34019)99 palind"
Nov 2016
(P^81993)SZ base 36

3,467 Posts

Quote:
 Originally Posted by Thomas11 I prepared a new version of mnash which is now also capable for bases other than b=2. For convenience the attached ZIP file also contains the latest single k universal base nash.exe. A positive k means k*b^n+1, negative k means k*b^n-1 (e.g. entering as -k*b^n+1) Usage examples are given below: Nash weights for sequences k*3^n-1 (for even k=10-20): Code: mnash -20 -10 2 3 (= kmin kmax kstep base) -20 3 2960 2960 -18 3 2686 2667 -16 3 1430 1435 -14 3 1524 1523 -12 3 2359 2369 -10 3 4054 4038 Note the reversed order due to the negative k values. If base is omitted, b=2 is assumed. and for k*7^n+1: Code: mnash 10 20 2 7 10 7 4000 3979 12 7 2407 2411 14 7 0 0 16 7 3211 3210 18 7 2392 2387 20 7 0 0 Nash weight for the single sequence 14*17^n-1: Code: nash -14 17 -14 17 803 800 Same here: If base is omitted, b=2 is assumed.
There is a bug:

Code:
C:\Users\user\Downloads\allnash>mnash -31 31 2 4
-31 4    0    0
-29 4  898  900
-27 4 2802 2812
-25 4    0    0
-23 4 2518 2517
-21 4 1111 1107
-19 4    0    0
-17 4 4485 4514
-15 4 2527 2503
-13 4    0    0
-11 4 1521 1518
-9 4  399  407
-7 4    0    0
-5 4 3958 3978
-3 4 3462 3468
-1 4    0    0
1 4   39   40
3 4 2821 2826
5 4    0    0
7 4 4016 4021
9 4 1539 1543
11 4    0    0
13 4 1756 1754
15 4 3495 3506
17 4    0    0
19 4 1543 1530
21 4 1692 1691
23 4    0    0
25 4 3745 3737
27 4 2865 2877
29 4    0    0
31 4 1462 1468
but 9*4^n-1 should have weight 0, since it is proven composite by full algebra factors (3*2^n-1) * (3*2^n+1)

 Similar Threads Thread Thread Starter Forum Replies Last Post CRGreathouse Factoring 3 2018-02-05 14:55 Romuald Factoring 1 2016-11-13 10:59 Brain GPU Computing 20 2015-10-25 18:39 Uncwilly Lounge 5 2014-07-07 22:36 GP2 Lounge 2 2003-12-03 14:13

All times are UTC. The time now is 07:27.

Thu Jul 7 07:27:48 UTC 2022 up 2:15, 0 users, load averages: 0.84, 1.12, 1.17