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”).

A020454
Primes that contain digits 1 and 6 only.
7
11, 61, 661, 6661, 11161, 16111, 16661, 66161, 111611, 161611, 611111, 616111, 1111661, 1611161, 1616161, 1616611, 1661111, 1661161, 1666111, 6111661, 6116111, 6116161, 6161161, 6611611, 6661111, 6661661, 11111161, 11166611, 11616611
OFFSET
1,1
LINKS
MATHEMATICA
Flatten[Table[Select[FromDigits/@Tuples[{1, 6}, n], PrimeQ], {n, 8}]] (* Vincenzo Librandi, Jul 27 2012 *)
Select[Flatten[Table[10*FromDigits/@Tuples[{1, 6}, n]+1, {n, 7}]], PrimeQ] (* Slightly faster than the above Mathematica program by forcing the last digit to be one. *) (* Harvey P. Dale, May 31 2018 *)
PROG
(Magma) [p: p in PrimesUpTo(11616611) | Set(Intseq(p)) subset [1, 6]]; // Vincenzo Librandi, Jul 27 2012. (see Berselli A020461).
CROSSREFS
Sequence in context: A088545 A259257 A289646 * A009016 A191596 A227087
KEYWORD
nonn,base
STATUS
approved