Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #10 Apr 29 2018 09:45:46
%S 25,32,54,98,125,126,128,140,196,230,243,246,255,256,315,322,348,366,
%T 392,512,520,576,625,810,828,896,1024,1029,1060,1080,1152,1166,1216,
%U 1224,1225,1243,1330,1395,1400,1458,1462,1512,1536,1548,1575,1647,1708,1792,1824,1872,1875
%N Composite numbers which contain their sum of the distinct prime factors (sopf function) as a substring.
%H Harvey P. Dale, <a href="/A225418/b225418.txt">Table of n, a(n) for n = 1..1000</a>
%e 17061 is in the sequence because 17061=3*11*11*47, sopf(17061)=3+11+47=61, substring of 17061.
%t Select[Range[2000],CompositeQ[#]&&SequenceCount[IntegerDigits[#], IntegerDigits[ Total[ FactorInteger[#][[All,1]]]]]>0&] (* _Harvey P. Dale_, Apr 29 2018 *)
%o (PARI) sopf(n)= {s=0; f=factor(n); for(i=1, matsize(f)[1], s+=f[i, 1]); return(s) }
%o Indigit(a,b)={ u=Vec(Str(a));v=Vec(Str(b));indi=0;la=#u;lb=#v;i=1;while(i<=la-lb+1&&indi==0,d=0;for(x=1,lb,if(v[x]==u[i+x-1],d+=1));indi=(d==lb) ;i+=1);return(indi)}
%o { for(i=1,10^4,if(Indigit(i,sopf(i))&&isprime(i)==0,print(i)))}
%K nonn,base
%O 1,1
%A _Antonio Roldán_, May 07 2013