%I #89 Dec 12 2019 11:38:51
%S 1,2,3,41,7,9,137131,61,2023244487101,13,19,11,143,142733,21,17,193,
%T 37,3907,1290366811360047359,1805030483980039,3803623,123,369,27,23,
%U 58271,47609,523,79,307,179,73,57,18032419296851,29,31,3281881401611107,69,171,60244474373,197,97
%N a(1) = 1, a(2) = 2; for n >= 3, a(n) = least number not included earlier that divides the concatenation of all previous terms.
%C From _Scott R. Shannon_, Dec 19 2019: (Start)
%C The next unknown term a(131) requires the factorization of a 517-digit composite number 46297...2963. (End)
%H Scott R. Shannon, <a href="/A240588/b240588.txt">Table of n, a(n) for n = 1..130</a>.
%e a(1)=1 and a(2)=2. a(1) U a(2) = 12 and its divisors are 1, 2, 3, 4, 6, 12. Therefore 3 is the least number not yet present in the sequence which divides 12. Again, a(1) U a(2) U a(3) = 123 and its divisors are 1, 3, 41, 123. Therefore a(4)=41. Etc.
%p with(numtheory):
%p T:=proc(t) local x, y; x:=t; y:=0; while x>0 do x:=trunc(x/10); y:=y+1; od; end:
%p P:=proc(q) local a,b,c,k,n; b:=12; print(1); print(2); c:=[1,2];
%p for n from 1 to q do a:=sort([op(divisors(b))]); for k from 2 to nops(a) do
%p if not member(a[k],c) then c:=[op(c),a[k]]; b:=a[k]+b*10^T(a[k]); print(a[k]); break;
%p fi; od; od; end: P(19);
%t a = {1, 2}; While[Length[a] < 22,
%t n = ToExpression[StringJoin[ToString /@ a]];
%t AppendTo[a, SelectFirst[Sort[Divisors[n]], FreeQ[a, #] &]]
%t ]; a
%Y Cf. A096097, A096098, A241811.
%K nonn,base
%O 1,2
%A _Paolo P. Lava_, Apr 29 2014
%E a(20)-a(40) from _Alois P. Heinz_, May 08 2014
%E a(22) corrected by _Ryan Hitchman_, Sep 14 2017
%E a(23)-a(25) from _Robert Price_, May 16 2019
%E a(23)-a(25) corrected, and a(26)-a(43) added by _Scott R. Shannon_, Dec 10 2019