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
MAPLE
isA166579 := proc(n) local dgs, wrks; if isprime(n) then dgs := convert(n, base, 10) ; wrks := false; for i from 1 to nops(dgs)-1 do if op(i, dgs) = 7 and op(i+1, dgs) = 1 then return true; end if; od: return false; else false; end if; end proc: for n from 1 to 8000 do if isA166579(n) then printf("%d, ", n) ; end if; od: # R. J. Mathar, Nov 30 2009
MATHEMATICA
p17Q[n_] := Module[{idn = IntegerDigits[n]}, MemberQ[Partition[idn, 2, 1], {1, 7}]]; Select[Prime[Range[1000]], p17Q] (* Vincenzo Librandi Sep 14 2012 *)
Select[Prime[Range[1000]], SequenceCount[IntegerDigits[#], {1, 7}]>0&] (* Harvey P. Dale, Apr 18 2022 *)
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, 17) \\ Charles R Greathouse IV, Jun 20 2014
CROSSREFS
KEYWORD
nonn,base,less
AUTHOR
Vincenzo Librandi, Nov 01 2009
STATUS
approved