OFFSET
0,1
COMMENTS
a(n) >= 2*4^n + 3*2^n - 1 = A297928(n) >= 2*(4^n + 2^n) + 1 = A085601(n), n > 0. - Iain Fox, Dec 29 2017 (edited by Iain Fox, Jan 08 2018)
a(17) <= 2^163 + 361736822347711983585853439 (probably much smaller), building on a Cunningham chain of length 17 found by Jaroslaw Wroblewski. a(n) exists for n <= 17, and probably for all n. - Jens Kruse Andersen, Jan 21 2018
EXAMPLE
a(1) = 13 because 13 in base 2 is 1101 and 10 is 2 and 13 is the least number with this property;
a(2) = 43 because 43 in base 2 is 101011 while 0101 is 5 and 10 is 2 and 43 is the least number with this property;
a(3) = 151 because 151 in base 2 is 10010111 while 001011 is 11, 0101 is 5 and 10 is 2 and 151 is the least number with this property.
MAPLE
with(numtheory): P:=proc(q) local a, b, c, i, j, k, n, ok, x; x:=5; for k from 1 to q do for n from x to q do a:=convert(ithprime(n), base, 2); ok:=1; for i from 1 to k do b:=nops(a)-i; while a[b]=0 do b:=b-1; od;
c:=0; for j from b by -1 to i+1 do c:=2*c+a[j]; od; if not isprime(c) then ok:=0; break; fi; od; if ok=1 then x:=n; print(ithprime(n)); break; fi; od; od; end: P(10^20);
MATHEMATICA
Table[SelectFirst[Prime@ Range[#, # + 10^5] &@ PrimePi[2 (4^n + 2^n) + 1], AllTrue[Map[FromDigits[#, 2] &, Rest@ NestWhileList[Most@ Rest@ # &, IntegerDigits[#, 2], Length@ # > 2 &]], PrimeQ] &], {n, 8}] (* Michael De Vlieger, Dec 29 2017 *)
PROG
CROSSREFS
KEYWORD
nonn,base,hard,more
AUTHOR
Paolo P. Lava, Paolo Iachia, Dec 21 2017
EXTENSIONS
Definition corrected, a(10)-a(12) by Jens Kruse Andersen, Jan 21 2018
STATUS
approved