%I #16 Apr 07 2022 16:30:07
%S 858,2002,2442,3003,4774,5005,5115,6666,10101,15351,17871,22422,22722,
%T 24242,26562,26962,28482,35853,36363,41314,43734,43834,45654,47874,
%U 49494,49794,49894,51015,51315,51415,53535,53835,53935,56865,58485
%N Palindromes with exactly 4 distinct prime factors.
%H Robert Israel, <a href="/A046394/b046394.txt">Table of n, a(n) for n = 1..10000</a>
%p filter:= proc(n) local F;
%p F:= ifactors(n)[2];
%p nops(F)=4 and max(map(t->t[2],F))=1
%p end proc:
%p makepali:= proc(n,d) local L;
%p L:= convert(n,base,10);
%p if d::even then 10^(d/2)*n + add(L[i]*10^(d/2-i),i=1..d/2)
%p else 10^((d-1)/2)*n + add(L[i]*10^((d+1)/2-i),i=2..(d+1)/2)
%p fi
%p end proc:
%p select(filter, [seq(seq(makepali(x,d),
%p x=10^ceil(d/2-1)..10^ceil(d/2)-1),d=1..6)]); # _Robert Israel_, Jun 05 2018
%t Select[Range[60000],PalindromeQ[#]&&PrimeNu[#]==Total[FactorInteger[#][[All,2]]] == 4&] (* _Harvey P. Dale_, Apr 07 2022 *)
%Y Cf. A046330, A046410.
%K nonn,base
%O 1,1
%A _Patrick De Geest_, Jun 15 1998
|