login
A309234
a(n) is the least number such that the concatenation of all the previous terms with it is squarefree and has n prime factors. a(0)=0.
0
0, 2, 1, 10, 29, 5, 154, 66, 1005, 158, 18634, 8190, 113022, 62010, 102310, 5313758, 15617985, 510510
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
Cf. A005117.
Sequence in context: A327923 A024433 A026057 * A071926 A133103 A336729
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