login
a(n) is the least number that has n prime factors, counted by multiplicity, and n runs in its decimal representation.
0

%I #22 Jan 07 2025 10:05:04

%S 2,10,102,1012,10104,101010,1010124,10101216,101010176,1010101504,

%T 10101010304,101010101248,1010101013280,10101010101248,

%U 101010101013504,1010101010137856,10101010101010432,101010101010145280,1010101010101010432,10101010101010497536,101010101010101084160,1010101010101010620416,10101010101010105368576

%N a(n) is the least number that has n prime factors, counted by multiplicity, and n runs in its decimal representation.

%C Is a(n) always an n-digit member of A043096, i.e. a number with all pairs of adjacent digits distinct?

%F A001222(a(n)) = A043562(a(n)) = n.

%e a(4) = 1012 because 1012 = 2^2 * 11 * 23 has 4 prime factors, counted with multiplicity, and 4 runs in its decimal representation, and no smaller number works.

%p f:= proc(n)

%p local x,x0,L,t,i;

%p if n::odd then x0:= (10^(n+1)-1)/99 else x0:= (10^(n+1)-10)/99 fi;

%p for x from x0 do

%p L:= convert(x,base,10);

%p t:= nops(L) - numboccur(0, L[2..-1]-L[1..-2]);

%p if t = n and numtheory:-bigomega(x) = n then return x fi

%p od

%p end proc:

%p map(f, [$1..23]);

%Y Cf. A001222, A043096, A043562, A379229.

%K nonn,base

%O 1,1

%A _Robert Israel_, Jan 07 2025