login
Primes that contain only the digits (6, 7, 9).
2

%I #12 Sep 08 2022 08:46:13

%S 7,67,79,97,677,769,797,967,977,997,6679,6779,6967,6977,6997,7669,

%T 7699,9677,9679,9697,9767,9769,9967,66697,66797,66977,67679,67699,

%U 67777,67967,67979,69677,69697,69767,69779,69997,76667,76679,76697,76777,77699,77797

%N Primes that contain only the digits (6, 7, 9).

%C A020469 and A020471 are subsequences.

%H Alois P. Heinz, <a href="/A261184/b261184.txt">Table of n, a(n) for n = 1..10000</a>

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

%t Select[Prime[Range[6 10^4]], Complement[IntegerDigits[#], {6, 7, 9}] == {} &]

%t Select[Flatten[Table[FromDigits/@Tuples[{6,7,9},n],{n,5}]],PrimeQ] (* _Harvey P. Dale_, Jun 18 2021 *)

%o (Magma) [p: p in PrimesUpTo(2*10^5) | Set(Intseq(p)) subset [6, 7, 9]];

%Y Cf. similar sequences listed in A261181.

%Y Cf. A000040, A020469, A020471.

%K nonn,easy,base

%O 1,1

%A _Vincenzo Librandi_, Aug 11 2015