OFFSET
1,1
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..1000
FORMULA
a(n) ~ n log n. - Charles R Greathouse IV, Jun 20 2014
MATHEMATICA
p222Q[n_] := Module[{idn = IntegerDigits[n]}, MemberQ[Partition[idn, 3, 1], {2, 2, 2}]]; Select[Prime[Range[15000]], p222Q] (* Vincenzo Librandi Sep 14 2012 *)
Select[Prime[Range[12000]], SequenceCount[IntegerDigits[#], {2, 2, 2}]>0&] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Nov 08 2017 *)
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, 222) \\ Charles R Greathouse IV, Jun 20 2014
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Vincenzo Librandi, Nov 01 2009
STATUS
approved