login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A020454 Primes that contain digits 1 and 6 only. 5

%I

%S 11,61,661,6661,11161,16111,16661,66161,111611,161611,611111,616111,

%T 1111661,1611161,1616161,1616611,1661111,1661161,1666111,6111661,

%U 6116111,6116161,6161161,6611611,6661111,6661661,11111161,11166611,11616611

%N Primes that contain digits 1 and 6 only.

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

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

%t 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 *)

%o (MAGMA) [p: p in PrimesUpTo(11616611) | Set(Intseq(p)) subset [1, 6]]; // _Vincenzo Librandi_, Jul 27 2012. (see Berselli A020461).

%K nonn,base

%O 1,1

%A _David W. Wilson_

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 21 15:02 EDT 2019. Contains 323443 sequences. (Running on oeis4.)