mersenneforum.org  

Go Back   mersenneforum.org > Prime Search Projects > Twin Prime Search

Reply
 
Thread Tools
Old 2019-07-19, 04:04   #254
The Carnivore
 
The Carnivore's Avatar
 
Jun 2010

2×89 Posts
Default

Quote:
Originally Posted by Dylan14 View Post
I have searched n = 49796-49999 through to k = 1M (using twinsieve from the mtsieve suite and LLR) and found no twins. Hence the k/n pair for 49000-49999 is the right one.
If you need residues from that search, I have them.
Thanks! All we need now to complete the table is a smallest first twin k for n=44000-44999 and n=46000-46999. I'll plot a regression curve on it once we have that data.

Code:
Range            Smallest First Twin k       n-value
1000-1999           177                        1032
2000-2999          4359                        2191
3000-3999          1149                        3283
4000-4999          2565                        4901
5000-5999          5775                        5907
6000-6999          4737                        6634
7000-7999         33957                        7768
8000-8999           459                        8529
9000-9999         33891                        9869
10000-10999       10941                       10601
11000-11999         915                       11455
12000-12999       73005                       12178
13000-13999        3981                       13153
14000-14999      175161                       14171
15000-15999       74193                       15770
16000-16999      138153                       16436
17000-17999       14439                       17527
18000-18999       56361                       18989
19000-19999       53889                       19817
20000-20999        7485                       20023
21000-21999      195045                       21432
22000-22999       31257                       22312
23000-23999      396213                       23672
24000-24999      177141                       24365
25000-25999      577065                       25879
26000-26999      182697                       26172
27000-27999       70497                       27652
28000-28999      445569                       28353
29000-29999      815751                       29705
30000-30999      249435                       30977
31000-31999      440685                       31989
32000-32999       51315                       32430
33000-33999      143835                       33826
34000-34999      959715                       34895
35000-35999      338205                       35351
36000-36999       47553                       36172
37000-37999      201843                       37630
38000-38999      683145                       38746
39000-39999      126423                       39606
40000-40999      604329                       40315
41000-41999      358965                       41653
42000-42999      272139                       42379
43000-43999      441201                       43167
44000-44999       >1M                          ???
45000-45999      311541                       45439
46000-46999       >1M                          ???
47000-47999      103893                       47122
48000-48999      694599                       48501
49000-49999      197109                       49733
The Carnivore is offline   Reply With Quote
Old 2020-06-09, 22:09   #255
carpetpool
 
carpetpool's Avatar
 
"Sam"
Nov 2016

3×97 Posts
Post k*b^n+-1 with k < n?

Also another interesting problem if anyone's interested:

Twin primes of the form k*b^n+-1 with k < n -->


Due to the limited choices of fixing only base b, there are extremely rare. I tested some bases (3, 5, 6, 7, 10, 11, 12). Here are the largest twins found to n=2K (except b=3, which is checked to n=10K). Quite small, I tell you:

Second twin (p+2):

Code:
2618*3^4286+1
336*5^765+1
613*6^1922+1
525*10^632+1
1182*11^1409+1
860*12^967+1
I didn't find any for base 7, although I'm sure they exist. The idea is that if k < n, we can get k as small as possible, so if all bases < 100 were tested, odds are you'll find a twin with a very small k. Continuing on with the search.

Last fiddled with by carpetpool on 2020-06-09 at 22:10
carpetpool is offline   Reply With Quote
Old 2020-06-10, 21:15   #256
Dylan14
 
Dylan14's Avatar
 
"Dylan"
Mar 2017

3×7×23 Posts
Default

Quote:
Originally Posted by carpetpool View Post
Also another interesting problem if anyone's interested:

Twin primes of the form k*b^n+-1 with k < n -->
I wrote a Python script to drive the sieving:
Code:
#script to automate sieving for small twins of the form k*b^n+/-1, where
#k < n

import subprocess

#set parameters
b = input("Enter a base (not a perfect power):")
minn = input("Enter the minimum n to test:")
maxn = input("Enter the maximum n to test:")

#check that minn is not 1. Otherwise the only k we would test is k = 0, but
#0*b^1+/-1 = +/-1 for all b. And +1 and -1 are not prime (by definition).
if int(minn) == 1:
    raise ValueError("n = 1 implies we have to test k = 0 only, and 0*b^1+/-1 is either 1 or -1, which are not prime.")
else:    
    n = int(minn)
while n <= int(maxn):
    #we'll set the max sieve depth via if/else statements, 
    #we can adjust this if needed
    if n <= 5000:
        sievedepth = 1000000
    elif n <= 10000:
        sievedepth = 5000000
    elif n <= 20000:
        sievedepth = 25000000
    elif n <= 40000:
        sievedepth = 100000000
    else:
        sievedepth = 250000000
    #calculate maxk, which is n-1
    maxk = n-1
    #for n = 2 we have to be a bit more careful. The only meaningful k is 1. But twinsieve gives a error: kmax has to be greater than kmin.
    #so we will tell the user that he'll need to test it himself with pfgw.
    if n == 2:
        print("n = 2 yields an error in twinsieve. You'll need to test " + str(b) + "^" + str(n) + "+/-1 yourself in LLR or pfgw.")
        n = n + 1
    else:
        #now call subprocess.
        subprocess.run(["twinsieve", "-P", str(sievedepth), "-k", "1", "-K", str(maxk), "-b", str(b),"-n", str(n)])
        n = n+1
Using this, I tested b = 20 to n = 2k. I found the following twin primes:
Code:
3*20^8+1 
3*20^8-1
105*20^152+1
105*20^152-1
24*20^36+1
24*20^36-1
60*20^68+1
60*20^68-1
3*20^69+1
3*20^69-1
Dylan14 is offline   Reply With Quote
Old 2020-06-11, 20:13   #257
carpetpool
 
carpetpool's Avatar
 
"Sam"
Nov 2016

3×97 Posts
Post

I don't suppose newpgen + pfgw would be faster than twinsieve ?


Here are the twin primes bases up to 48:

Code:
k*b^n+-1 with k <= n

base = 3	(check to n=15000)
2*3^2+1
8*3^10+1
4*3^15+1
10*3^22+1
10*3^102+1
76*3^139+1
928*3^988+1
476*3^1483+1
2618*3^4286+1
2926*3^11071+1
---
base = 5	(check to n=2000)
12*5^51+1
84*5^103+1
156*5^202+1
336*5^765+1
---
base = 6	(check to n=2000)
1*6^1+1
2*6^2+1
2*6^3+1
2*6^4+1
3*6^6+1
17*6^35+1
23*6^67+1
143*6^162+1
187*6^251+1
152*6^279+1
157*6^371+1
257*6^824+1
430*6^1318+1
1743*6^1916+1
613*6^1922+1
---
base = 7	(check to n=2000)
(none)
---
base = 10	(check to n=2000)
3*10^3+1
3*10^7+1
126*10^182+1
525*10^632+1
---
base = 11	(check to n=2000)
1182*11^1409+1
---
base = 12	(check to n=2000)
1*12^1+1
4*12^5+1
4*12^15+1
860*12^967+1
---
base = 13	(check to n=2000)
180*13^202+1
228*13^428+1
---
base = 14	(check to n=2000)
(none)
---
base = 15	(check to n=2000)
2*15^10+1
14*15^14+1
2*15^20+1
238*15^353+1
---
base = 17	(check to n=2000)
(none)
---
base = 18	(check to n=2000)
1*18^1+1
9*18^11+1
231*18^307+1
357*18^1664+1
---
base = 19	(check to n=2000)
(none)
---
base = 20	(check to n=2000)
24*20^36+1
3*20^69+1
105*20^152+1
---
base = 21	(check to n=2000)
8*21^26+1
22*21^26+1
30*21^44+1
52*21^55+1
418*21^1919+1
---
base = 22	(check to n=2000)
(none)
---
base = 23	(check to n=2000)
(none)
---
base = 24	(check to n=2000)
13*24^23+1
10*24^66+1
---
base = 26	(check to n=2000)
210*26^742+1
837*26^1244+1
---
base = 28	(check to n=2000)
12*28^16+1
---
base = 29	(check to n=2000)
(none)
---
base = 30	(check to n=2000)
1*30^1+1
14*30^43+1
141*30^169+1
14*30^262+1
446*30^504+1
1389*30^1563+1
---
base = 31	(check to n=2000)
168*31^183+1
---
base = 33	(check to n=2000)
(none)
---
base = 34	(check to n=2000)
3*34^11+1
255*34^676+1
828*34^856+1
---
base = 35	(check to n=2000)
930*35^1167+1
---
base = 37	(check to n=2000)
(none)
---
base = 38	(check to n=2000)
3*38^10+1
9*38^53+1
45*38^111+1
---
base = 39	(check to n=2000)
608*39^706+1
---
base = 40	(check to n=2000)
30*40^39+1
3*40^324+1
273*40^326+1
132*40^574+1
---
base = 41	(check to n=2000)
168*41^261+1
312*41^1208+1
---
base = 42	(check to n=2000)
1*42^1+1
5*42^9+1
6*42^57+1
90*42^121+1
53*42^158+1
652*42^746+1
---
base = 43	(check to n=2000)
30*43^1525+1
---
base = 44	(check to n=2000)
3*44^9+1
---
base = 45	(check to n=2000)
2*45^8+1
84*45^84+1
268*45^318+1
136*45^768+1
308*45^970+1
---
base = 46	(check to n=2000)
18*46^25+1
267*46^358+1
---
base = 47	(check to n=2000)
(none)
---
base = 48	(check to n=2000)
4*48^7+1
2*48^8+1
3*48^8+1
24*48^323+1
30*48^673+1
---

Last fiddled with by carpetpool on 2020-06-11 at 20:14
carpetpool is offline   Reply With Quote
Old 2020-06-11, 20:26   #258
Dylan14
 
Dylan14's Avatar
 
"Dylan"
Mar 2017

3×7×23 Posts
Default

I'd imagine for small n and b newpgen and twinsieve will take roughly the same time. For larger values of these quantities twinsieve will likely have the advantage as 1. It doesn't have the memory restrictions that newpgen has, and 2. It's part of the mtsieve framework, so we can run it multithreaded.
And it appears your list for b = 20 is missing two primes: the ones for n = 8 (k value is 3) and 68 (k value is 60).
Dylan14 is offline   Reply With Quote
Old 2020-06-15, 21:51   #259
carpetpool
 
carpetpool's Avatar
 
"Sam"
Nov 2016

3·97 Posts
Post

Here is the complete set: Bases <= 24 checked to n=5K, others < 100 checked to n=2K. Also verified smaller twin primes, which I had forgot most of them in my previous list.
Attached Files
File Type: txt small_twin_set-bases-3-24.txt (1.6 KB, 8 views)
File Type: txt small_twin_set-bases-26-99.txt (4.0 KB, 7 views)
carpetpool is offline   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
Sieving with powers of small primes in the Small Prime variation of the Quadratic Sieve mickfrancis Factoring 2 2016-05-06 08:13
Relativistic Twins davar55 Science & Technology 68 2015-01-20 21:01
3x*2^n-1 and 3x*2^n-1 possibly twins ? science_man_88 Riesel Prime Search 10 2010-06-14 00:33
The Twins GP2 Lounge 1 2003-11-18 04:50
NOT twins graeme Puzzles 11 2003-09-04 00:41

All times are UTC. The time now is 18:16.

Sat Jul 4 18:16:46 UTC 2020 up 101 days, 15:49, 2 users, load averages: 2.35, 2.70, 2.48

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, 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.