login
Primes whose product of decimal digits is a power of 3.
2

%I #29 Dec 09 2024 14:28:47

%S 3,11,13,19,31,113,131,139,191,193,199,311,313,331,911,919,991,1193,

%T 1319,1399,1913,1931,1933,1993,1999,3119,3191,3313,3319,3331,3391,

%U 3911,3919,3931,9133,9199,9311,9319,9391,9931,11113,11119,11131,11311,11393,11399

%N Primes whose product of decimal digits is a power of 3.

%C Primes whose digit set is a subset of {1,3,9}.

%H Alois P. Heinz, <a href="/A329761/b329761.txt">Table of n, a(n) for n = 1..20000</a>

%H Marianne Freiberger, <a href="https://plus.maths.org/content/missing-7s">Primes without 7s</a>.

%H James Maynard, <a href="http://arxiv.org/abs/1604.01041">Primes with restricted digits</a>, arXiv:1604.01041 [math.NT], 2016.

%H James Maynard and Brady Haran, <a href="https://www.youtube.com/watch?v=eeoBCS7IEqs">Primes without a 7</a>, Numberphile video (2019)

%F { A000040 } intersect { A174813 }.

%F a(n) in { A000040 } and A007954(a(n)) in { A000244 }.

%t Select[Prime[Range[1500]],IntegerQ[Log[3,Times@@IntegerDigits[#]]]&] (* or *) Table[Select[FromDigits/@Tuples[{1,3,9},n],PrimeQ],{n,5}]// Flatten (* _Harvey P. Dale_, Dec 31 2019 *)

%o (Magma) [p: p in PrimesUpTo(12000) | Set(Intseq(p)) subset [1,3,9]]; // _Vincenzo Librandi_, Jan 02 2019

%Y Subsequence of A030096.

%Y Cf. A000040, A000244, A007954, A020457, A174813.

%K nonn,base

%O 1,1

%A _Alois P. Heinz_, Nov 20 2019