OFFSET
1,1
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
EXAMPLE
a(3) = 29 is a term because it is prime, the sum of its prime digits is 2, and 29+2 = 31 is also prime.
MAPLE
f:= p -> p + convert(select(isprime, convert(p, base, 10)), `+`):
select(t -> isprime(t) and isprime(f(t)), [seq(i, i=3..2000, 2)]);
MATHEMATICA
Select[Prime@Range@200, PrimeQ@Total[Join[{#}, Select[IntegerDigits@#, PrimeQ]]]&] (* Giorgos Kalogeropoulos, Apr 01 2021 *)
PROG
(PARI) isok(p) = isprime(p) && isprime(p+sumdigits(p)); \\ Michel Marcus, Apr 01 2021
CROSSREFS
KEYWORD
nonn,base
AUTHOR
J. M. Bergot and Robert Israel, Mar 31 2021
STATUS
approved