%I #17 Apr 01 2021 05:08:26
%S 11,19,29,37,41,53,61,73,89,101,109,149,181,191,199,229,233,257,269,
%T 277,281,307,331,359,379,383,401,409,419,433,449,461,491,499,563,587,
%U 593,601,619,641,653,661,673,677,691,727,797,809,811,821,881,911,919,937,941,977,991,1009,1019,1033
%N Primes p such that p + the sum of its prime digits is prime.
%H Robert Israel, <a href="/A342961/b342961.txt">Table of n, a(n) for n = 1..10000</a>
%e 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.
%p f:= p -> p + convert(select(isprime,convert(p,base,10)),`+`):
%p select(t -> isprime(t) and isprime(f(t)), [seq(i,i=3..2000,2)]);
%t Select[Prime@Range@200,PrimeQ@Total[Join[{#},Select[IntegerDigits@#,PrimeQ]]]&] (* _Giorgos Kalogeropoulos_, Apr 01 2021 *)
%o (PARI) isok(p) = isprime(p) && isprime(p+sumdigits(p)); \\ _Michel Marcus_, Apr 01 2021
%Y Includes A034844. Cf. A085563, A342962.
%K nonn,base
%O 1,1
%A _J. M. Bergot_ and _Robert Israel_, Mar 31 2021
|