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

A243527
Prime numbers containing the string 111.
3
1117, 2111, 4111, 8111, 10111, 11113, 11117, 11119, 11131, 11149, 11159, 11161, 11171, 11173, 11177, 11197, 16111, 22111, 25111, 26111, 28111, 35111, 40111, 41113, 41117, 44111, 47111, 50111, 58111, 65111, 68111, 70111, 71119, 79111, 80111
OFFSET
1,1
LINKS
FORMULA
a(n) ~ n log n. - Charles R Greathouse IV, Jun 20 2014
MATHEMATICA
Select[Prime[Range[90000]], !StringFreeQ[ToString[#], "111"]&]
PROG
(PARI) contains(n, k)=my(N=digits(n), K=digits(k)); for(i=0, #N-#K, for(j=1, #K, if(N[i+j]!=K[j], next(2))); return(1)); 0
is(n)=isprime(n) && contains(n, 111) \\ Charles R Greathouse IV, Jun 20 2014
CROSSREFS
Cf. prime numbers containing the string kkk: this sequence (k=1), A166580 (k=2), A166581 (k=3), A166582 (k=4), A167281 (k=5), A131645 (k=6), A167282 (k=7), A167290 (k=8), A167292 (k=9).
Sequence in context: A221428 A161848 A020380 * A251360 A201034 A264312
KEYWORD
nonn,base,easy
AUTHOR
Vincenzo Librandi, Jun 06 2014
STATUS
approved