%I #10 Oct 23 2019 11:19:54
%S 146,226,278,346,1018,1177,1273,1546,1594,1865,1945,2138,2545,2762,
%T 2798,2869,3118,3317,3817,4022,4045,4069,4126,4198,4213,4249,4322,
%U 4417,4502,4511,4918,5114,5389,5438,5473,5515,5645,5677,5855,6169,6209,6218,6362
%N Smaller of two consecutive semiprimes with the same digital root.
%H Nathaniel Johnston, <a href="/A118699/b118699.txt">Table of n, a(n) for n = 1..10000</a>
%F A010888(a(n))=A010888(b(n)) where a(n)=A001358(k), b(n)=A001358(k+1). - _R. J. Mathar_, May 23 2006
%e 146 and 155 are two consecutive semiprimes with the same digital root, namely 2.
%p with(numtheory): A001358 := proc(n) option remember: local k: if(n=1)then return 4:fi: for k from procname(n-1)+1 do if bigomega(k) = 2 then return k: fi: od: end: A118699ind := proc(n) option remember: local k: if(n=1)then return 50:fi: for k from procname(n-1)+1 do if(A001358(k) mod 9 = A001358(k+1) mod 9)then return k: fi: od: end: seq(A001358(A118699ind(n)),n=1..20); # _Nathaniel Johnston_, May 04 2011
%t Select[Partition[Select[Range[6400],PrimeOmega[#]==2&],2,1],1+Mod[#[[1]]-1,9] == 1+Mod[#[[2]]-1,9]&][[All,1]] (* _Harvey P. Dale_, Oct 23 2019 *)
%o (PARI) isA001358(n)= { local(f,fct,sumpo); if(n <4, return(0) ); f=factor(n); fct=(matsize(f))[1]; sumpo= sum(i=1,fct,f[i,2]); if ( sumpo != 2, return(0), return(1) ); } A010888(n)= { if( n %9 != 0, return(n % 9), return(9) ); } { oldr=0; oldn=0; for(n=5,10000, if( isA001358(n)==1, dr=A010888(n); if(dr==oldr, print1(oldn,","); ); oldr=dr; oldn=n; ); ); } \\ _R. J. Mathar_, May 23 2006
%Y Cf. A001358.
%K base,easy,nonn
%O 1,1
%A Luc Stevens (lms022(AT)yahoo.com), May 20 2006
%E Corrected and extended by _R. J. Mathar_, May 23 2006