mersenneforum.org  

Go Back   mersenneforum.org > New To GIMPS? Start Here! > Information & Answers

Reply
 
Thread Tools
Old 2016-03-05, 19:07   #1
PawnProver44
 
PawnProver44's Avatar
 
"NOT A TROLL"
Mar 2016
California

197 Posts
Post How to create file to test primes automatically

I want to easily find primes of the form k*b^n+-c. However, manually testing the variables takes a long time. I am using Pfgw. Can someone please help create a file so I can always find the nearest k, n, or c values. For example, I want to find a prime of the form 43*71^n +300, (for large primes) and I do not want to manually test exponents, so is there a format file that tests primes of the form k*b^n+-c, so all I can do is just plug in the variables. Thanks for helping.
PawnProver44 is offline   Reply With Quote
Old 2016-03-05, 21:20   #2
Batalov
 
Batalov's Avatar
 
"Serge"
Mar 2008
Phi(4,2^7658614+1)/2

954210 Posts
Default

Quote:
Originally Posted by PawnProver44 View Post
For example, I want to find a prime of the form 43*71^n +300, (for large primes)
...there are no primes of the form 43*71^n+300. 7 divides all of this sequence.

Take (mod 7) of 43*71^n+300. To do that you can take mod 7 of each coefficient: 1*1^n+6, which is 7 = 0 (mod 7).

Anyway, this is just a poor example. The bigger problem is that if you find large enough (say, > 50,000 digits) prime candidates (probable primes), you will not be able to prove that they are prime. If you still want to search for these large PRPs, use srsieve to sieve. You can submit large PRPs to PRP top.
Batalov is offline   Reply With Quote
Old 2016-03-05, 21:22   #3
paulunderwood
 
paulunderwood's Avatar
 
Sep 2002
Database er0rr

23·32·53 Posts
Default

You need this sort of thing in your input file:

Code:
ABC 43*71^$a+300
1
2
3
4
5
6
...
Alternatively you can specify it with:

Code:
ABC2 43*71^$a+300
a: from 1 to 1000000
Using the "-f" -- for factor -- flag will greatly improve your speed.

You might find that someone has written a sieve for this form.

A word of warning: To prove a number prime you need at least 12.5% of the factorisation of N^2-1, where N is the number being proven. See this page. Otherwise, general purpose proving algorithms, such as ECPP, work up to about 30k digits if you are very patient, whereas numbers that can be proven by BLS N+/-1 can be proved in minutes to hours.

Look in pfgwdoc.txt and abcfileformats.txt for more info.

Last fiddled with by paulunderwood on 2016-03-05 at 21:24
paulunderwood is offline   Reply With Quote
Old 2016-03-06, 01:45   #4
PawnProver44
 
PawnProver44's Avatar
 
"NOT A TROLL"
Mar 2016
California

197 Posts
Default New Prime Form

Thanks for your advice!

And that form 43*71^n+300 is a bad example since it is divisible by 7, so I replaced the form with 24*181^n+229, anyways I created a file called input.txt and here were the following lines:

ABC2 24*181^$a+229
a: from 1 to 3000
...

I then used the Pfgw (Win64Pfgw.exe) compatible command line and typed in:

input.txt

and gave me;

PFGW Version 3.7.10.32BIT.20150809.Win_Dev [GWNUM 28.6]

Error opening file input.txt

Do you know what went wrong? Please let me know.
PawnProver44 is offline   Reply With Quote
Old 2016-03-06, 07:06   #5
Batalov
 
Batalov's Avatar
 
"Serge"
Mar 2008
Phi(4,2^7658614+1)/2

225068 Posts
Default

43*71^n+c has many c values that generate all-composite sequences; they have a so-called covering set. But a few c values are working fine, e.g. c=4.

For kicks and giggles I sieved the c=4 series and ran it for a while. There are a few small primes (43*71^0+4, 43*71^4+4, 43*71^144+4, 43*71^784+4) and then a larger unprovable PRP: 43*71^38292+4 (submitted to PRPtop)
_________________________

Re: "Error opening file input.txt"
Check where you put the input.txt file. Is it in the same folder as the pfgw executable? If not - provide the full path, or move it in the same folder.
Then put "-f -l input.txt" in the text window of Win64Pfgw.exe.
Works fine here, and quickly finds a few tiny primes
24*181^14+229
24*181^51+229
Batalov is offline   Reply With Quote
Old 2016-03-07, 04:29   #6
PawnProver44
 
PawnProver44's Avatar
 
"NOT A TROLL"
Mar 2016
California

110001012 Posts
Default Prptop

I am Trying to submit my own PRP, and I came up with the form: 60*79^n+19, known primes are for n = 0, 1, 3, 42, 91, 165, 585, 763, 2472, 3535, 3870, 5088. Do you know how to find the next term in less than 1 hour, if so what is it? (I tested exponents <10000) using pfgw.


Last fiddled with by PawnProver44 on 2016-03-07 at 04:30
PawnProver44 is offline   Reply With Quote
Old 2016-03-07, 20:37   #7
Batalov
 
Batalov's Avatar
 
"Serge"
Mar 2008
Phi(4,2^7658614+1)/2

2·13·367 Posts
Default

It is not very large. You can find it yourself, if you try hard enough.
It is already in the PRPtop.
Batalov is offline   Reply With Quote
Old 2016-03-07, 21:20   #8
PawnProver44
 
PawnProver44's Avatar
 
"NOT A TROLL"
Mar 2016
California

197 Posts
Default

you submitted it, right?
PawnProver44 is offline   Reply With Quote
Old 2016-03-07, 21:43   #9
paulunderwood
 
paulunderwood's Avatar
 
Sep 2002
Database er0rr

23·32·53 Posts
Default

Quote:
Originally Posted by PawnProver44 View Post
I am Trying to submit my own PRP, and I came up with the form: 60*79^n+19, known primes are for n = 0, 1, 3, 42, 91, 165, 585, 763, 2472, 3535, 3870, 5088. Do you know how to find the next term in less than 1 hour, if so what is it? (I tested exponents <10000) using pfgw.

Is 60*79^5088+19 really a "known prime" or does it merely have PRP status at the moment?
paulunderwood is offline   Reply With Quote
Old 2016-03-07, 21:52   #10
Batalov
 
Batalov's Avatar
 
"Serge"
Mar 2008
Phi(4,2^7658614+1)/2

2·13·367 Posts
Default

Quote:
Originally Posted by PawnProver44 View Post
you submitted it, right?
Is the Pope Catholic?
Batalov is offline   Reply With Quote
Old 2016-03-07, 22:03   #11
PawnProver44
 
PawnProver44's Avatar
 
"NOT A TROLL"
Mar 2016
California

3058 Posts
Default

Quote:
Originally Posted by paulunderwood View Post
Is 60*79^5088+19 really a "known prime" or does it merely have PRP status at the moment?
Pfgw says it is a PRP-3, but I used other programs to prove the number prime, I am trying to find a larger term however.
PawnProver44 is offline   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to create TWO fat CPU credits? ET_ PrimeNet 12 2008-11-03 22:11
Feature request: Automatically delete already tested primes JuanTutors Software 11 2006-11-13 04:09
Re New test for Mersenne Primes K Ramsey Miscellaneous Math 6 2006-06-04 09:45
Alternative Test for Primes. mfgoode Math 37 2006-03-19 18:03
Small windows programs to create and delete the stop.txt file for console ver NFSNET dsouza123 Programming 0 2003-09-28 20:40

All times are UTC. The time now is 11:37.


Sat Sep 25 11:37:12 UTC 2021 up 64 days, 6:06, 1 user, load averages: 1.71, 1.54, 1.45

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.