OFFSET
1,1
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
Eric Weisstein's World of Mathematics, Triskaidekaphobia
Wikipedia, Triskaidekaphobia
FORMULA
a(n) ~ n log n. - Charles R Greathouse IV, Nov 09 2011
MATHEMATICA
p13Q[n_] := Module[{idn = IntegerDigits[n]}, MemberQ[Partition[idn, 2, 1], {1, 3}]]; Select[Prime[Range[1000]], p13Q] (* Vincenzo Librandi, Sep 14 2012 *)
Select[Prime[Range[1500]], ! StringFreeQ[ToString[#], "13"] &] (* Vincenzo Librandi, May 03 2015 *)
PROG
(Haskell)
import Data.List (isInfixOf)
a166573 n = a166573_list !! (n-1)
a166573_list = filter (("13" `isInfixOf`) . show) a000040_list
-- Reinhard Zumkeller, Nov 09 2011
(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, 13) \\ Charles R Greathouse IV, Jun 20 2014
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Vincenzo Librandi, Nov 01 2009
EXTENSIONS
Corrected (313 inserted) by R. J. Mathar, Nov 30 2009
STATUS
approved