login
A152097
Least k(n) such that 3*2^k(n)*M(n)-1 or 3*2^k(n)*M(n)+1 is prime (or both primes) with M(i)=i-th Mersenne prime.
1
1, 1, 2, 1, 3, 2, 1, 5, 6, 9, 31, 44, 18, 71, 81, 1097, 64, 789, 42, 17, 908, 722, 1500, 1496, 5690, 6720, 3340, 18768, 9597, 13835
OFFSET
1,3
COMMENTS
These are certified primes using PFGW from Primeform group.
EXAMPLE
3*2^1*(2^2 - 1) - 1 = 17 is prime, as is 19, so k(1)=1 as M(1) = 2^2 - 1;
3*2^1*(2^3 - 1) - 1 = 41 is prime, as is 43, so k(2)=1 as M(2) = 2^3 - 1;
3*2^2*(2^5 - 1) + 1 = 373 is prime, so k(3)=2 as M(3) = 2^5 - 1.
PROG
(PARI) /* these functions are too slow for n > about 15 */
mersenne(n) = {local(i, m); i=n; m=1; while(i>0, m=m+1; if(isprime(2^m-1), i=i-1)); 2^m-1}
A152097(n) = {local(k, m); k=1; m=mersenne(n); while(!(isprime(3*2^k*m-1)||isprime(3*2^k*m+1)), k=k+1); k} \\ Michael B. Porter, Mar 18 2010
CROSSREFS
Cf. A145983.
Sequence in context: A131345 A134423 A061260 * A119442 A064861 A305299
KEYWORD
more,nonn
AUTHOR
Pierre CAMI, Nov 24 2008
STATUS
approved