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 #4 Sep 13 2024 08:07:08
%S 13,115,1113,11116,1111124,11111120,111111156,1111111128,11111111616,
%T 111111121116,1111111111616,111111111113184,1111111111113012,
%U 11111111111112192,111111111111151616,1111111111111113216,51111111111111111168,111411111111111111168,11111111111111111311360
%N a(n) is the least number with n decimal digits 1 and n prime factors, counted with multiplicity.
%e a(3) = 1113 because 1113 contains 3 1's and 1113 = 3 * 7 * 53 has 3 prime factors, counted with multiplicity.
%p g:= proc(x,S,d)
%p local L,i;
%p L:= convert(x,base,9);
%p add(`if`(L[i]=0,0,L[i]+1)*10^S[i],i=1..nops(L)) + add(10^i,i={$0..d-1} minus S)
%p end proc:
%p f:= proc(n)
%p local x,d,Cands,S;
%p x:= (10^n-1)/9;
%p if numtheory:-bigomega(x) = n then return x fi;
%p for d from n+1 do
%p Cands:= sort([seq(seq(g(x,S,d),x =9^(d-n-1) .. 9^(d-n)-1),S = combinat:-choose({$0..d-1},d-n))]);
%p for x in Cands do if numtheory:-bigomega(x) = n then return x fi od;
%p od;
%p end proc:
%p seq(f(i),i=1..19);
%Y Cf. A376063.
%K nonn,base
%O 1,1
%A _Robert Israel_, Sep 12 2024