login
A126612
a(n) is the least K such that K*6*M(n) - 1 and K*6*M(n) + 1 are twin primes, where M(n) = n-th Mersenne prime.
0
1, 1, 7, 24, 12, 52, 24, 39, 252, 112, 371, 184, 5772, 44649, 61939, 151505, 64125, 533040, 407635, 273249, 3901012, 718187, 3527063, 9522163, 23128315, 20121642, 337342290, 388787370
OFFSET
1,3
EXAMPLE
7*6*(2^5-1)-1=1301 prime, 1301 and 1303 twin primes so K(3)=7 as M(3)=2^5-1.
MATHEMATICA
Array[Block[{k = 1, m = 2^MersennePrimeExponent@ # - 1}, While[! AllTrue[6 k m + {-1, 1}, PrimeQ], k++]; k] &, 14] (* Michael De Vlieger, Dec 22 2019 *)
PROG
(PARI) forprime(p=2, 607, if(isprime(Mp=2^p-1), forstep(k=6, 10^9, 6, if(isprime(k*Mp-1), if(isprime(k*Mp+1), print1(k/6", "); break))))) \\ Serge Batalov, Dec 22 2019
CROSSREFS
Sequence in context: A012482 A124985 A349078 * A196113 A286506 A286406
KEYWORD
nonn,more
AUTHOR
Pierre CAMI, Feb 08 2007
EXTENSIONS
Missing term 44649 and a(26-28) from Serge Batalov, Dec 21 2019
STATUS
approved