OFFSET
1,1
EXAMPLE
263 is in the sequence because 263 becomes 44665627 which is also prime, where 44665627 is the concatenation of the numbers (2^2, 6^6, 3^3) = (4, 46656, 27).
2503 is in the sequence because 2503 becomes 43125127 which is also prime, where 43125127 is the concatenation of the numbers (2^2, 5^5, 0^0, 3^3) = (4, 3125, 1, 27).
MAPLE
with(numtheory):T:=array(1..10):L:=array(1..10):
for n from 1 to 1000 do:
p:=ithprime(n):k:=0:s:=0:j:=0:
x:=convert(p, base, 10):n1:=nops(x):
for m from n1 by -1 to 1 do:
k:=k+1:T[k]:=x[k]^x[k]:L[k]:=length(T[k]):
od:
n2:=sum('L[j]', 'j'=1..n1):s2:=0:
for u from n1 by -1 to 1 do:
s2:=s2+T[u]*10^(n2-L[u]):n2:=n2-L[u]:
od:
if type(s2, prime)=true
then
printf(`%d, `, p):
else
fi:
od:
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Michel Lagneau, Apr 09 2014
STATUS
approved