login
Primes such that the product of their digits subtracted from the prime number is another prime.
2

%I #12 Jul 29 2017 10:13:59

%S 23,29,41,43,47,83,89,127,149,181,223,227,229,241,251,263,271,277,293,

%T 347,349,367,383,389,419,431,433,439,457,479,487,541,587,631,641,643,

%U 647,653,659,673,677,743,761,853,857,859,863,883,887,1123,1229,1279,1297,1423,1459,1489,1523

%N Primes such that the product of their digits subtracted from the prime number is another prime.

%H Paolo P. Lava, <a href="/A228139/b228139.txt">Table of n, a(n) for n = 1..1000</a>

%e 23 is a member since 23-(2*3)=17. 29 is a member since 29-(2*9)=11.

%t pdsQ[n_]:=Module[{pr=Times@@IntegerDigits[n]},pr!=0&&PrimeQ[n-pr]]; Select[Prime[Range[300]],pdsQ] (* _Harvey P. Dale_, Jul 29 2017 *)

%o (PARI) dprod(n)=my(v=digits(n));prod(i=1,#v,v[i])

%o is(n)=my(d=dprod(n)); d>0 && isprime(n) && isprime(n-d) \\ _Charles R Greathouse IV_, Aug 12 2013

%Y Subsequence of A038618.

%K nonn,base

%O 1,1

%A _Will Gosnell_, Aug 12 2013

%E a(3), a(10), a(15)-a(57) from _Charles R Greathouse IV_, Aug 12 2013