cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A166572 Prime numbers containing the string 11.

This page as a plain text file.
%I A166572 #13 Sep 24 2022 13:53:49
%S A166572 11,113,211,311,811,911,1103,1109,1117,1123,1129,1151,1153,1163,1171,
%T A166572 1181,1187,1193,1511,1811,2011,2111,2113,2311,2411,2711,3011,3119,
%U A166572 3511,3911,4111,4211,5011,5113,5119,5711,6011,6113,6211,6311,6911,7211,7411
%N A166572 Prime numbers containing the string 11.
%H A166572 Vincenzo Librandi, <a href="/A166572/b166572.txt">Table of n, a(n) for n = 1..1000</a>
%F A166572 a(n) ~ n log n. - _Charles R Greathouse IV_, Jun 20 2014
%p A166572 isA166572 := 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) = 1 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 isA166572(n) then printf("%d,",n) ; end if; od: # _R. J. Mathar_, Nov 30 2009
%t A166572 p11Q[n_]: = Module[{idn = IntegerDigits[n]}, MemberQ[Partition[idn, 2, 1], {1, 1}]] Select[Prime[Range[1000]], p11Q] (* _Vincenzo Librandi_, Sep 14 2012 *)
%t A166572 Select[Prime[Range[1000]],SequenceCount[IntegerDigits[#],{1,1}]>0&] (* _Harvey P. Dale_, Sep 24 2022 *)
%o A166572 (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
%o A166572 is(n)=isprime(n) && contains(n,11) \\ _Charles R Greathouse IV_, Jun 20 2014
%Y A166572 Cf. A166571, A166573, A166579, A166580, A166581, A166582.
%K A166572 nonn,base
%O A166572 1,1
%A A166572 _Vincenzo Librandi_, Nov 01 2009