login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

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

%I #12 Jul 27 2012 21:29:58

%S 5,11,151,1151,1511,11551,15511,15551,51151,51511,51551,55511,115151,

%T 511111,511151,515111,1111151,1115551,1155151,1551551,1555111,5115511,

%U 5151151,5151551,5155511,5511151,5511511,5515151,5551111,15511151

%N Primes that contain digits 1 and 5 only.

%C The first 8 terms are also primes when read backward, i.e. in A007500. See also A199325. - M. F. Hasler, Nov 05 2011

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

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

%o (PARI) {L=[1,5];for(d=1,9,u=vector(d,i,10^(d-i))~;forvec(v=vector(d,i,[1,#L]),ispseudoprime(t=vector(d,i,L[v[i]])*u)&print1(t",")))} \\ - M. F. Hasler, Nov 05 2011

%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 | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 16 19:05 EDT 2024. Contains 371751 sequences. (Running on oeis4.)