login
A260226
Primes that contain only the digits (3, 5, 8).
2
3, 5, 53, 83, 353, 383, 853, 883, 3533, 3583, 3833, 3853, 5333, 8353, 33353, 33533, 35353, 35533, 38333, 38833, 53353, 55333, 83383, 83833, 85333, 85853, 88853, 88883, 333383, 333533, 335383, 335833, 338383, 353333, 353833, 355853, 383533, 383833, 533353
OFFSET
1,1
COMMENTS
A020462 and A020464 are subsequences.
LINKS
MATHEMATICA
Select[Prime[Range[5 10^4]], Complement[IntegerDigits[#], {3, 5, 8}]=={} &]
Select[Flatten[Table[FromDigits/@Tuples[{3, 5, 8}, n], {n, 6}]], PrimeQ] (* or *) Join[{3, 5}, Select[10#+3&/@Flatten[Table[FromDigits/@Tuples[{3, 5, 8}, n], {n, 5}]], PrimeQ]] (* The second program is faster because it recognizes that, except only for 5, each such prime must end in 3. *) (* Harvey P. Dale, Jul 17 2020 *)
PROG
(Magma) [p: p in PrimesUpTo(2*10^6) | Set(Intseq(p)) subset [3, 5, 8]];
CROSSREFS
Cf. similar sequences listed in A260223.
Sequence in context: A219506 A171775 A260227 * A101149 A056260 A213052
KEYWORD
nonn,easy,base
AUTHOR
Vincenzo Librandi, Jul 22 2015
STATUS
approved