login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

Primes in A239237.
0

%I #29 Apr 03 2023 15:00:28

%S 503,10169,10253,10303,10753,11047,12409,12503,13049,14083,20333,

%T 20773,20929,21023,21067,21407,23053,23059,25033,25303,29303,30089,

%U 30103,31063,32057,32099,32303,33403,38083,40087,40213,40253,40483,40787,41609,42403,43103,46103,50227,50363

%N Primes in A239237.

%F Intersection of A000040 and A239237.

%p q:= n-> andmap(isprime, [n, add(n^i, i=convert(n, base, 10))]):

%p select(q, [$1..60000])[]; # _Alois P. Heinz_, Apr 03 2023

%t Select[Prime[Range[5200]], PrimeQ[Total[#^IntegerDigits[#]]] &] (* _Amiram Eldar_, Mar 06 2023 *)

%o (PARI) is(p) = isprime(p) && isprime(vecsum([p^d|d<-digits(p)])); \\ _Kevin Ryde_, Mar 06 2023

%o (Python)

%o from itertools import count, islice

%o from sympy import isprime

%o def A361252_gen(startvalue=1): # generator of terms >= startvalue

%o 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))

%o A361252_list = list(islice(A361252_gen(),20)) # _Chai Wah Wu_, Apr 03 2023

%Y Cf. A239237.

%K nonn,base

%O 1,1

%A _Teja Prabhu Buddala_, Mar 05 2023