OFFSET
1,1
MAPLE
q:= n-> andmap(isprime, [n, add(n^i, i=convert(n, base, 10))]):
select(q, [$1..60000])[]; # Alois P. Heinz, Apr 03 2023
MATHEMATICA
Select[Prime[Range[5200]], PrimeQ[Total[#^IntegerDigits[#]]] &] (* Amiram Eldar, Mar 06 2023 *)
PROG
(PARI) is(p) = isprime(p) && isprime(vecsum([p^d|d<-digits(p)])); \\ Kevin Ryde, Mar 06 2023
(Python)
from itertools import count, islice
from sympy import isprime
def A361252_gen(startvalue=1): # generator of terms >= startvalue
return filter(lambda n:'0' in (s:=str(n)) and isprime(n) and isprime(sum(s.count(d)*n**int(d) for d in set(s))), count((k:=max(1, startvalue))+1-(k&1), 2))
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Teja Prabhu Buddala, Mar 05 2023
STATUS
approved