login
A266388
Integers k such that the concatenation of 2^k and 2^k - 1 is prime.
0
2, 14, 18, 58, 570, 3198, 4462, 7266
OFFSET
1,1
COMMENTS
First four primes: 43, 1638416383, 262144262143, 288230376151711744288230376151711743.
All six primes == 3 (mod 10).
All six integer 'k' are even.
From Jon E. Schoenfield, Sep 08 2021: (Start)
a(9) > 20000.
Let p = concatenation(2^k, 2^k - 1); then if k is odd, p is divisible by 3, and if k is a multiple of 4, p is divisible by 5, so (since no value of k gives p=3 or p=5) if p is prime, then k == 2 (mod 4), from which it follows that p == 3 (mod 20).
(End)
EXAMPLE
For k = 2 we have 2^2 = 4 and 2^2 - 1 = 3, and their concatenation (43) is a prime number.
MATHEMATICA
Monitor[Do[If[PrimeQ@FromDigits@Flatten[IntegerDigits/@{2^k, 2^k-1}], Print@k], {k, 10^4}], k] (* Giorgos Kalogeropoulos, Sep 08 2021 *)
PROG
(Python)
from sympy import isprime
def afind(limit, startk=0):
pow2 = 2**startk
for k in range(startk, limit+1):
if isprime(int(str(pow2) + str(pow2 - 1))): print(k, end=", ")
pow2 *= 2
afind(600) # Michael S. Branicky, Sep 08 2021
(PARI) isok(k) = isprime(eval(Str(2^k, 2^k-1))); \\ Michel Marcus, Sep 09 2021
CROSSREFS
Sequence in context: A108029 A212048 A322955 * A032476 A274062 A059205
KEYWORD
nonn,base,more
AUTHOR
Emre APARI, Feb 23 2016
EXTENSIONS
a(7)-a(8) from Michael S. Branicky, Sep 08 2021
STATUS
approved