OFFSET
1,1
EXAMPLE
3^3 = 27 = concat(2,7);
3^5 = 243 = concat(2,43);
3^6 = 729 = concat(7,29);
3^9 = 19683 = concat(19,683).
MAPLE
with(numtheory): P:= proc(q) local a, k, n, ok; a:=0;
for n from 1 to q do ok:=0;
for k from 1 to ilog10(3^n) do if isprime(trunc(3^n/10^k)) and isprime(3^n mod 10^k) then ok:=1;
break; fi; od; if ok=1 then a:=a+1; lprint(a, n); fi; od; end: P(10^10);
MATHEMATICA
ctpQ[k_]:=AnyTrue[Boole[PrimeQ[Table[FromDigits/@TakeDrop[IntegerDigits[3^k], n], {n, IntegerLength[ 3^k-1]}]]], #=={1, 1}&]; Select[Range[1250], ctpQ] (* Harvey P. Dale, Apr 17 2024 *)
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Paolo P. Lava, Oct 23 2015
STATUS
approved