login
A361252
Primes in A239237.
0
503, 10169, 10253, 10303, 10753, 11047, 12409, 12503, 13049, 14083, 20333, 20773, 20929, 21023, 21067, 21407, 23053, 23059, 25033, 25303, 29303, 30089, 30103, 31063, 32057, 32099, 32303, 33403, 38083, 40087, 40213, 40253, 40483, 40787, 41609, 42403, 43103, 46103, 50227, 50363
OFFSET
1,1
FORMULA
Intersection of A000040 and A239237.
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))
A361252_list = list(islice(A361252_gen(), 20)) # Chai Wah Wu, Apr 03 2023
CROSSREFS
Cf. A239237.
Sequence in context: A200959 A179172 A133525 * A066525 A043304 A045212
KEYWORD
nonn,base
AUTHOR
Teja Prabhu Buddala, Mar 05 2023
STATUS
approved