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.

A137167 Semiprimes that do not contain any other semiprimes as a substring.

This page as a plain text file.
%I A137167 #10 Sep 21 2015 01:19:47
%S A137167 4,6,9,10,15,21,22,25,33,35,38,51,55,57,58,77,82,85,87,111,118,123,
%T A137167 178,183,201,202,203,205,237,278,301,302,303,305,323,327,371,501,502,
%U A137167 505,527,537,703,707,713,717,718,723,731,737,753,781,802,803,807,813,817
%N A137167 Semiprimes that do not contain any other semiprimes as a substring.
%C A137167 Semiprime analog of A033274. If there is more than one digit, all digits must be nonsemiprime numbers {0,1,2,3,5,7,8}.
%e A137167 Start with all semiprimes and sieve out the ones which have semiprime substrings. Semiprime A001358(5) = 14 is not in this sequence because it contains the digit "4" which is semiprime A001358(1). Semiprime A001358(35) = 106 is not in this sequence because it contains the digit "6" which is semiprime A001358(2) and also contains as substring "10" which is semiprime A001358(4).
%p A137167 isA001358 := proc(n) if numtheory[bigomega](n) = 2 then true ; else false ; fi ; end: Lton := proc(L) local a,i; a :=0 ; for i from 1 to nops(L) do a := 10*a+op(i,L) ; od: a ; end: isA137167 := proc(n) local dgs,strti,endi ; if isA001358(n) then dgs := ListTools[Reverse](convert(n,base,10)) ; for strti from 1 to nops(dgs) do for endi from strti to nops(dgs) do if strti > 1 or endi < nops(dgs) then if isA001358(Lton([op(strti..endi,dgs)])) then RETURN(false) : fi ; fi ; od: od: RETURN(true) ; else RETURN(false) ; fi ; end: for n from 1 to 1600 do if isA137167(n) then printf("%d,",n) ; fi ; od: # _R. J. Mathar_, Apr 12 2008
%t A137167 smQ[n_]:=PrimeOmega[n]==2&&NoneTrue[Select[Union[FromDigits/@ Flatten[ Table[Partition[IntegerDigits[n],i,1],{i,IntegerLength[n]-1}],1]], #>0&],PrimeOmega[#]==2&]; Select[Range[1000],smQ] (* The program uses the NoneTrue function from Mathematica version 10 *) (* _Harvey P. Dale_, Sep 26 2014 *)
%Y A137167 Cf. A001358, A033274, A107342.
%K A137167 base,easy,nonn,less
%O A137167 1,1
%A A137167 _Jonathan Vos Post_, Apr 03 2008
%E A137167 More terms from _R. J. Mathar_, Apr 12 2008