%I #17 Apr 03 2023 10:36:11
%S 2,3,5,7,19,109,127,137,139,149,157,163,167,173,179,181,191,193,197,
%T 199,271,281,283,307,317,337,347,367,373,379,397,419,461,463,467,491,
%U 541,557,571,613,617,619,631,641,643,647,661,673,691,719,733,739,743,751
%N Primes whose digit sum contains one or more digits of the same prime.
%H Robert Israel, <a href="/A158473/b158473.txt">Table of n, a(n) for n = 1..10000</a>
%H Chris Caldwell, <a href="https://t5k.org/lists/small/1000.txt">The First 1,000 Primes</a>
%e 139 is a prime whose digit sum of 13 contains the digits 1 and 3 which are also in the prime.
%e 149 is a prime whose digit sum of 14 contains the digits 1 and 4 which are also in the prime.
%e 419 is a prime whose digit sum of 14 contains the digits 1 and 4 which are also in the prime.
%p filter:= proc(n) local L,s;
%p L:= convert(n,base,10);
%p s:= convert(L,`+`);
%p convert(convert(s,base,10),set) intersect convert(L,set) <> {}
%p end proc:
%p select(filter, [seq(ithprime(i),i=1..100)]); # _Robert Israel_, Feb 27 2023
%o (PARI) isok(p) = isprime(p) && (#setintersect(Set(digits(p)), Set(digits(sumdigits(p)))) >= 1); \\ _Michel Marcus_, Nov 12 2017
%Y Cf. A107579, A158217, A158293.
%K base,nonn
%O 1,1
%A _Parthasarathy Nambi_, Mar 20 2009
%E Single-digit primes added by _R. J. Mathar_, Jul 08 2009
%E Typos in data corrected by _D. S. McNeil_ and _Andrew Weimholt_, Aug 17 2010