A301806 Numbers k such that the concatenation of 2^k - 1 and 2^(k - 1) - 1 is prime.
2, 3, 4, 7, 8, 12, 19, 22, 36, 46, 51, 67, 79, 215, 359, 394, 451, 1323, 2131, 3336, 3371, 6231, 19179, 39699, 51456, 56238, 69660, 75894, 79798, 92020, 174968, 176006, 181015, 285019, 331259, 360787, 366770
Offset: 1
Examples
2 is in the sequence because the concatenation of 3 and 1 is 31, which is prime. 3 is in the sequence because the concatenation of 7 and 3 is 73, which is prime. 5 is not in the sequence because the concatenation of 31 and 15 is 3115 = 5 * 7 * 89.
Programs
-
Mathematica
Select[Range[10^3], PrimeQ@ FromDigits[Join @@ IntegerDigits@ {2^# - 1, 2^(# - 1) - 1}] &] (* Michael De Vlieger, Oct 17 2018 *)
-
PARI
isok(n) = isprime(eval(concat(Str(2^n-1), Str(2^(n-1)-1)))); \\ Michel Marcus, Mar 27 2018
-
PFGW
ABC2 (2^$a-1)*10^len(2^($a-1)-1)+2^($a-1)-1 a: from x to y
Extensions
a(33) from Paolo Galliani, May 02 2018
a(34) from Paolo Galliani, Jun 14 2018
a(35) from Paolo Galliani, Jul 17 2018
a(36)-a(37) from Paolo Galliani, Aug 27 2018
Comments