login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Primes that contain digits 3 and 8 only.
8

%I #15 Sep 08 2022 08:44:45

%S 3,83,383,883,3833,38333,38833,83383,83833,88883,333383,338383,383833,

%T 3333383,3383383,3833833,3838333,3838883,3883333,3888383,8338333,

%U 8388833,8838383,8838833,8838883,8883883,38383883,83333333,83883883,88838333

%N Primes that contain digits 3 and 8 only.

%H Vincenzo Librandi, <a href="/A020464/b020464.txt">Table of n, a(n) for n = 1..1000</a>

%t Flatten[Table[Select[FromDigits/@Tuples[{3,8},n],PrimeQ],{n,8}]] (* _Vincenzo Librandi_, Jul 27 2012 *)

%t Select[Flatten[Table[10#+3&/@(FromDigits/@Tuples[{3,8},n]),{n,0,7}]], PrimeQ] (* _Harvey P. Dale_, Jan 06 2019 *)

%o (Magma) [p: p in PrimesUpTo(88838333) | Set(Intseq(p)) subset [3,8]]; // _Vincenzo Librandi_, Jul 27 2012

%K nonn,base

%O 1,1

%A _David W. Wilson_