login
Primes whose product of nonzero digits + 1 is prime.
2

%I #17 May 19 2019 12:48:40

%S 2,11,23,29,41,43,47,61,67,89,101,149,163,167,211,223,227,229,233,251,

%T 257,263,269,281,349,367,383,401,409,419,431,433,439,463,491,521,523,

%U 569,587,601,607,613,617,631,643,659,661,673,761,769,809,821,827,857

%N Primes whose product of nonzero digits + 1 is prime.

%H Robert Israel, <a href="/A084354/b084354.txt">Table of n, a(n) for n = 1..10000</a>

%p filter:= proc(n) local p;

%p if not isprime(n) then return false fi;

%p p:= 1+ convert(subs(0=NULL, convert(n,base,10)),`*`);

%p isprime(p)

%p end proc:

%p select(filter, [2,seq(i,i=3..1000,2)]); # _Robert Israel_, Mar 06 2018

%t okQ[n_]:=Module[{idn=IntegerDigits[n]},PrimeQ[1+Times@@Select[idn,#>0&]]]

%t Select[Prime[Range[150]],okQ] (* _Harvey P. Dale_, Jan 20 2011 *)

%Y Cf. A066725.

%K base,easy,nonn

%O 1,1

%A _Jason Earls_, Jun 22 2003