login
A378459
a(n) is the least k such that the concatenation of 2^n-1 and 2^k-1 is prime, or -1 if there is no such k.
1
1, 1, 1, 1, 1, 1, 3, 1, 2, 13, 3, 11, 5, 5, 2, 1, 6, 1, 3, 1, 25, 5, 9, 7, 6, 3, 11, 3, 2, 17, 2, 99, 31, 15, 3, 19, 6, 9, 1, 1, 5, 23, 9, 1, 11, 15, 5, 11, 26, 9, 2, 35, 17, 43, 17, 61, 11, 21, 13, 139, 3, 13, 25, 17, 14, 1, 2, 21, 19, 9, 3, 5, 6, 177, 41, 39, 2, 73, 22, 9, 31, 3, 2, 89, 179, 21
OFFSET
1,7
COMMENTS
a(n) is coprime to n, and is not divisible by 4.
a(1812) > 37000 if it is not -1.
LINKS
EXAMPLE
a(7) = 3 because the concatenation of 2^7-1 = 127 and 2^3-1 = 7 is 1277 which is prime, and neither 1271 nor 1273 is prime.
MAPLE
tcat:= (a, b) -> 10^(1+ilog10(b))*a+b:
f:= proc(i) local x, j;
x:= 2^i-1;
for j from 1 by `if`(i::even, 2, 1) do
if j mod 4 = 0 or igcd(i, j) > 1 then next fi;
if isprime(tcat(x, 2^j-1)) then return j fi;
od
end proc:
map(f, [$1..100]);
MATHEMATICA
idf[a_]:=IntegerDigits[2^a-1]; Table[k=0; Until[PrimeQ[FromDigits[Join[idf[n], idf[k]]]], k++]; k, {n, 86}] (* James C. McMahon, Dec 05 2024 *)
CROSSREFS
First column of A378288.
Sequence in context: A254630 A145463 A144107 * A199647 A199149 A198669
KEYWORD
nonn,base
AUTHOR
Robert Israel, Nov 26 2024
STATUS
approved