%I #47 Nov 21 2018 11:39:22
%S 23,5,3,7,2,3,43,47,3,3,7,11,17,11,3,29,3,11,3,109,11,43,71,19,71,11,
%T 11,3,7,229,43,269,7,23,3,61,37,677,113,863,59,3,11,487,359,347,3,19,
%U 53,173,3,127,229,7,3,3,13,3,241,41,79,79,3,83,23,31,71,31
%N Minimum prime p such that p^n is a concatenation of two primes.
%H Paolo P. Lava, <a href="/A255898/b255898.txt">Table of n, a(n) for n = 1..200</a>
%e 23^1 = 23 = concat(2,3);
%e 5^2 = 25 = concat(2,5);
%e 3^3 = 27 = concat(2,7).
%p with(numtheory): P:= proc(q) local a,k,n,ok;
%p for a from 1 to q do for n from 1 to q do if isprime(n) then ok:=0;
%p for k from 1 to ilog10(n^a) do if isprime(trunc(n^a/10^k)) and isprime(n^a mod 10^k) then ok:=1; break; fi; od;
%p if ok=1 then lprint(a,n); break; fi; fi; od; od; end: P(10^9);
%t mp[n_]:=Module[{p=2},While[Count[PrimeQ[#]&/@Table[FromDigits/@ TakeDrop[ IntegerDigits[ p^n],i],{i,IntegerLength[p^n]}],{True,True}]== 0,p= NextPrime[ p]];p]; Array[mp,70] (* Requires Mathematica version 10 or later *) (* _Harvey P. Dale_, Oct 13 2016 *)
%o (PARI) a(n) = {forprime(p=2, , my(pn = p^n); for (k=1, #Str(pn), if (isprime(pn\10^k) && isprime(pn % 10^k), return (p));););} \\ _Michel Marcus_, Oct 22 2015
%Y Cf. A000040, A255579.
%K nonn,base,easy
%O 1,1
%A _Paolo P. Lava_, Oct 21 2015