login
Semiprime + (smallest integer obtained by concatenating its two divisors).
2

%I #22 Apr 08 2020 17:10:34

%S 26,29,42,35,41,50,58,134,80,158,146,206,92,230,172,269,126,224,170,

%T 250,287,293,200,302,311,194,323,260,329,380,228,406,341,290,359,448,

%U 350,377,296,1232,383,464,472,330,401,488,413,1256,440,419,470,437,512

%N Semiprime + (smallest integer obtained by concatenating its two divisors).

%H Robert Israel, <a href="/A106552/b106552.txt">Table of n, a(n) for n = 1..10000</a>

%e First semiprime is 4; 4 is 2*2; 26=4+22.

%e Second semiprime is 6; 6 is 2*3 (23) or 3*2 (32); 29=6+23.

%e ...

%e Eighth semiprime is 22; 22 is 2*11 (211) or 11*2 (112); 134=22+112.

%p count:= 0:

%p R:= NULL:

%p for n from 4 while count < 100 do

%p F:= ifactors(n)[2];

%p if nops(F) = 1 and F[1][2]=2 then count:= count+1; R:= R, n + F[1][1]*(1+10^(1+ilog10(F[1][1])))

%p elif nops(F) = 2 and F[1][2]=1 and F[2][2]=1 then

%p count:= count+1; p:= F[1][1]; q:= F[2][1];

%p R:= R, n + min(p+10^(1+ilog10(p))*q, q+10^(1+ilog10(q))*p)

%p fi

%p od:

%p R; # _Robert Israel_, Apr 08 2020

%t cc[n_]:=Module[{fi=Transpose[FactorInteger[n]][[1]]},If[Length[fi]==1, n+FromDigits[Flatten[ IntegerDigits/@{fi,fi}]],n+FromDigits[Flatten[ IntegerDigits/@SortBy[fi,First[IntegerDigits[#]]&]]]]];cc/@ Select[ Range[300],PrimeOmega[#]==2&](* _Harvey P. Dale_, Dec 15 2013 *)

%o (PARI) lista(nn) = {for (n=1, nn, if (bigomega(n) == 2, f = factor(n); p = f[1, 1]; q = f[#f~, 1]; print1(n + min(p + q*10^(#Str(p)), q + p*10^(#Str(q))), ", ");););} \\ _Michel Marcus_, Nov 25 2013

%Y Cf. A001358, A106553

%K base,easy,nonn,look

%O 1,1

%A _Eric Angelini_, May 09 2005

%E Corrected and extended by _Harvey P. Dale_, Dec 15 2013

%E a(32) corrected by _Robert Israel_, Apr 08 2020