OFFSET
0,2
EXAMPLE
a(0) = 0.
a(1) = 2 because 02 = 2.
a(2) = 1 because 21 = 3 * 7.
…
a(7) = 66 because 211029515466 = 2 * 3 * 7 * 11 * 37 * 383 * 32233
MAPLE
with(numtheory): P:=proc(q) local a, b, j, n; a:=0;
for j from 1 to q do for n from 0 to q do
b:=a*10^length(convert(n, string))+n;
if issqrfree(b) then if nops(factorset(b))=j then print(n);
a:=a*10^length(n)+n; break;
fi; fi; od; od; end: P(10^9);
PROG
(PARI) a(n) = if(n==0, return(0)); my(prefix=vector(n-1, k, Str(a(k)))); for(k=1, oo, my(t=eval(concat(concat(prefix, [Str(k)])))); if(issquarefree(t) && bigomega(t) == n, return(k))); \\ Daniel Suteu, Feb 05 2023
CROSSREFS
KEYWORD
nonn,base,more
AUTHOR
Paolo P. Lava, Jul 17 2019
EXTENSIONS
a(12)-a(14) from Giovanni Resta, Jul 17 2019
a(12)-a(14) corrected and a(15)-a(17) added by Daniel Suteu, Feb 05 2023
STATUS
approved