login
Primes p(k) such that the product of digits of p(k) equals the product of digits of k.
1

%I #15 Oct 17 2020 16:12:46

%S 17,181,443,491,1163,2131,2143,2153,2621,4253,4621,7691,11483,11593,

%T 11813,23819,26951,27179,32261,32443,33811,35171,35227,37643,41543,

%U 42433,42443,44623,44917,45971,51473,54517,58193,61223,63131,64591

%N Primes p(k) such that the product of digits of p(k) equals the product of digits of k.

%C Numbers with product of digits=0, like prime(80) = 409, are not included. - _Harry J. Smith_, Feb 20 2010

%H Harry J. Smith, <a href="/A066521/b066521.txt">Table of n, a(n) for n = 1..1000</a>

%e 181 is the 42nd prime and the product of digits of both is 8.

%t Select[Table[{n,Prime[n]},{n,6500}],DigitCount[#[[1]],10,0]==0 && Times@@ IntegerDigits[#[[1]]]==Times@@IntegerDigits[#[[2]]]&][[All,2]] (* _Harvey P. Dale_, Oct 17 2020 *)

%o (PARI) ProdD(x)= { local(p=1); while (x>9 && p>0, p*=x%10; x\=10); return(p*x) } { n=0; for (m=1, 10^10, p=prime(m); d=ProdD(m); if (ProdD(p) == d && d, write("b066521.txt", n++, " ", p); if (n==1000, return)) ) } \\ _Harry J. Smith_, Feb 20 2010

%Y Cf. A007954, A033548.

%K base,less,nonn

%O 1,1

%A _Jason Earls_, Jan 05 2002