login
Primes whose product of nonzero digits divided by the sum of its digits is also prime.
1

%I #43 Sep 25 2024 13:16:16

%S 167,257,523,541,617,761,1447,1607,1861,2053,2251,2503,2521,2851,4051,

%T 5023,5281,5821,6701,8161,8521,10067,10607,10861,11273,11471,12713,

%U 13127,13217,13721,14407,16007,17123,17231,17321,18061,20507,20521,21247,21317,21713,22051

%N Primes whose product of nonzero digits divided by the sum of its digits is also prime.

%C No term N can have a "9" digit. [Proof: The sum of the digits of N is not a multiple of 3, but the numerator would be a multiple of 9, and so the number would be a multiple of 9, so not a prime.]

%H Harvey P. Dale, <a href="/A371631/b371631.txt">Table of n, a(n) for n = 1..1000</a>

%e 167 (prime) is a term because 1*6*7/(1+6+7)=42/14=3 (prime).

%t pQ[n_] := Block[{idp = DeleteCases[IntegerDigits[n], 0]}, PrimeQ[Times @@ idp/Total@ idp]]; Cases[Prime@ Range@ PrimePi[10^5], _?pQ]

%t Select[Prime[Range[2500]],PrimeQ[Times@@(IntegerDigits[#]/.(0->1))/Total[ IntegerDigits[ #]]]&] (* _Harvey P. Dale_, Sep 24 2024 *)

%Y Subsequence of A038367.

%Y Equals prime terms of A138566.

%K nonn,base,easy

%O 1,1

%A _Mikk Heidemaa_, May 24 2024