login
Minimum prime p such that all the powers p^k, with k = 2, 3, …, n, are concatenations of two primes, while p^(k+1) is not.
1

%I #47 Mar 22 2019 12:09:43

%S 5,53,17,239,773497,37194173,2208566719,60669226939

%N Minimum prime p such that all the powers p^k, with k = 2, 3, …, n, are concatenations of two primes, while p^(k+1) is not.

%e 5^2 = 25 = concat(2,5); while 5^3 = 125 cannot be separated into two primes.

%e 53^2 = 2809 = concat(2,809); 53^3 = 148877 = concat(14887,7); while 53^4 = 7890481 cannot be separated into two primes.

%e 17^2 = 289 = concat(2,89); 17^3 = 4913 = concat(491,3); 17^4 = 83521 = concat(83,521); while 17^5 = 1419857 cannot be separated into two primes.

%p with(numtheory): T:=proc(x) local y,z; z:=0; for y from 1 to ilog10(x) do

%p if isprime(trunc(x/10^y)) and isprime(x mod 10^y) then z:=1; break; fi; od; z; end:

%p P:=proc(q) local a,k,n,ok; for a from 2 to q do

%p for n from 3 by 2 to q do if isprime(n) then ok:=1;

%p for k from 2 to a do if T(n^k)=0 then ok:=0; break; fi; od;

%p if ok=1 then if T(n^(a+1))=0 then print(n); break; fi; fi;

%p fi; od; od; end: P(10^10);

%Y Cf. A000040, A255898.

%K nonn,base,more,hard

%O 2,1

%A _Paolo P. Lava_, Oct 21 2015

%E a(8)-a(9) from _Giovanni Resta_, May 31 2016