login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

Primes that contain digits 1 and 8 only.
6

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

%S 11,181,811,881,1181,1811,8111,18181,81181,88811,1111181,1181881,

%T 1881181,1881811,1881881,8118181,8181881,8188111,8188181,8818811,

%U 8881111,8881811,11818181,11881811,11888111,18111881,18118811,18181181,18811181,18888811

%N Primes that contain digits 1 and 8 only.

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

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

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

%K nonn,base

%O 1,1

%A _David W. Wilson_