The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A110053 Numbers n such that the string 111n is the decimal expansion of a prime number. 2

%I #11 Sep 08 2022 08:45:19

%S 7,13,17,19,31,49,59,61,71,73,77,97,103,109,119,121,127,143,149,187,

%T 191,211,217,227,229,253,263,269,271,301,317,323,337,341,347,373,409,

%U 427,431,439,443,467,487,491,493,497,509,521,533,539,577,581,593,599

%N Numbers n such that the string 111n is the decimal expansion of a prime number.

%H Vincenzo Librandi, <a href="/A110053/b110053.txt">Table of n, a(n) for n = 1..2500</a>

%e 7 is in the sequence because 1117 is prime.

%e 73 is in the sequence because 11173 is prime.

%e 103 is in the sequence because 111103 is prime.

%p a:= proc(n) local k; for k from 1 +`if`(n=1, 0, a(n-1))

%p while not isprime(parse(""||111||k)) do od; a(n):=k

%p end:

%p seq(a(n), n=1..100); # _Alois P. Heinz_, Jul 30 2014

%t Select[Range[1000], PrimeQ[FromDigits[Join[{1, 1, 1}, IntegerDigits[ # ]]]] &] (* _Alonso Delarte_, Sep 06 2005 *)

%t Select[Range[600], PrimeQ[111 10^IntegerLength[#] + #] &] (* _Vincenzo Librandi_, Jul 30 2014 *)

%o (Magma) [ n: n in [1..600] | IsPrime(Seqint(Intseq(n) cat [1, 1, 1])) ];

%K nonn,base

%O 1,1

%A _Parthasarathy Nambi_, Sep 04 2005

%E More terms from _Alonso del Arte_, Sep 06 2005

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 May 12 23:36 EDT 2024. Contains 372497 sequences. (Running on oeis4.)