

A232116


Primes such that the sum of each nonzero digit raised to itself is prime.


1



11, 23, 41, 43, 47, 101, 113, 131, 157, 263, 311, 401, 571, 751, 829, 997, 1013, 1031, 1103, 1187, 1301, 1433, 1583, 1619, 1871, 2003, 2063, 2089, 2111, 2221, 2357, 2579, 2683, 2753, 2957, 3011, 3257, 3343, 3413, 3433, 3527, 3581, 3637, 3673, 3851, 4001, 4003, 4007, 4133, 4441, 4481, 4597, 4649
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,1


LINKS



EXAMPLE

43 is a member of this sequence because 43 is prime and 4^4 + 3^3 = 256 + 27 = 283 is also prime.
263 is a member of this sequence because 263 is prime and 2^2 + 6^6 + 3^3 = 4 + 46656 + 27 = 46687 is also prime.


PROG

(Python)
from sympy import isprime, primerange
def Pow(n):
s = 0
for i in str(n):
k = int(i)
if k:
s += k**k
return s
{print(pn, end=', ') for pn in primerange(1, 2000) if isprime(Pow(pn))}
(PARI) sdiz(n) = {digs = digits(n); sum(i=1, #digs, if (digs[i], digs[i]^digs[i], 0)); }
lista(nn) = {forprime(n=1, nn, if (isprime(sdiz(n)), print1(n, ", "))); } \\ Michel Marcus, Nov 21 2013
(PARI)
has(n)=ispseudoprime(vecsum([x^xx<digits(n), x]))


CROSSREFS



KEYWORD

nonn,base


AUTHOR



STATUS

approved



