login
Smallest composite number with n distinct prime factors with property that the concatenation of its distinct prime factors, in descending order, is a palindrome.
0

%I #14 Jul 08 2016 09:50:10

%S 4,46,138,690,197890,5444670,156719940,4941906970,135969743910

%N Smallest composite number with n distinct prime factors with property that the concatenation of its distinct prime factors, in descending order, is a palindrome.

%C 4 = 2 * 2

%C 46 = 2 * 23

%C 138 = 2 * 3 * 23

%C 690 = 2 * 3 * 5 * 23

%C 197890 = 2 * 5 * 7 * 11 * 257

%C 5444670 = 2 * 3 * 5 * 7 * 11 * 2357

%C 156719940 = 2 * 2 * 3 * 5 * 13 * 17 * 53 * 223

%C 4941906970 = 2 * 5 * 7 * 11 * 13 * 17 * 113 * 257

%C 135969743910 = 2 * 3 * 5 * 7 * 11 * 13 * 17 * 113 * 2357

%e Prime factors of 4 are 2, 2 and concat(2,2) = 22 is palindromic.

%e Prime factors of 46 are 2, 23 and concat(23,2) = 232 is palindromic.

%e Prime factors of 5444670 are 2, 3, 5, 7, 11, 2357 and concat(2357,11,7,5,3,2) = 2357117532 is palindromic.

%p with(numtheory): T:=proc(w) local x, y, z; x:=0; y:=w; for z from 1 to ilog10(w)+1 do x:=10*x+(y mod 10); y:=trunc(y/10); od; x; end;

%p P:=proc(q) local a,b,c,i,j,k,n; c:=1; for j from 1 to q do for n from c to q do

%p if not isprime(n) then a:=ifactors(n)[2]; b:=[]; if nops(a)=j then for k from 1 to nops(a) do

%p for i from 1 to a[k][2] do b:=[op(b),a[k][1]]; od; od; b:=sort(b); a:=b[nops(b)];

%p for k from nops(b)-1 by -1 to 1 do a:=a*10^(ilog10(b[k])+1)+b[k]; od;

%p if T(a)=a then c:=n; print(n); break; fi; fi; fi; od; od; end: P(10^9);

%Y Cf. A046449.

%K nonn,base,more

%O 1,1

%A _Paolo P. Lava_, Jul 06 2016

%E a(7)-a(9) from _Giovanni Resta_