Problem 1688. Prime Sequences: AP-k Minimum Final Value
Welcome to Fun with Primes. Today we will find the Minimum Final Value AP-k sequences for n_max=3:12 given the primorial and knowledge that the solution is of the form a + b * k# * n.
The AP-k of n sequence is n_max+1 primes of the form a + b * k# * n where n=0:n_max. The value of "a" is a prime and k# is the primorial.
The primorial k# is the product of all primes ≤ k, e.g. 10# = 2 · 3 · 5 · 7.
Input: (k, n_max)
Output: [a, b] for the equation Prime = a + b * k# * n, n=0:n_max; Prime(n_max) must be the optimum minimum.
Value Range Limits: [a<150,000 , b<8 ]
Example:
(13, 13) yields [31385539,14 ]; 31385539 + 14·13#·n (End Prime 36850999)
Commentary:
(13, 16) has a non-minimal end [17, 11387819007325752 ] to give Primes=17 + 11387819007325752·13#·n
The current June 2013 record for n is 25 via PrimeGrid: 43142746595714191 + 23681770·23#·n
Solution Stats
Problem Comments
-
1 Comment
Did Cody decrease the maximum time you can run a solution before it times out? My previous solutions were about 16-18 sec on my box, but timed out here. The one that finally worked was at around 13 sec on my box.
Solution Comments
Show commentsProblem Recent Solvers4
Suggested Problems
-
Back to basics 11 - Max Integer
785 Solvers
-
Who knows the last digit of pi?
662 Solvers
-
Permute diagonal and antidiagonal
447 Solvers
-
Find the index of n in magic(n)
243 Solvers
-
964 Solvers
More from this Author308
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!