login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

a(1)=1; thereafter each term is the concatenation of consecutive numbers, without repetition, and is coprime to all earlier terms.
1

%I #12 Apr 20 2017 15:11:00

%S 1,2,3,4567,89,10111213,1415,16171819,2021,22232425262728293031,3233,

%T 34353637,3839,40414243,4445464748495051,52535455565758596061,6263,

%U 64656667,6869,70717273747576777879,8081,82838485868788899091,9293,949596979899100101102103,104105106107

%N a(1)=1; thereafter each term is the concatenation of consecutive numbers, without repetition, and is coprime to all earlier terms.

%H Paolo P. Lava, <a href="/A271631/b271631.txt">Table of n, a(n) for n = 1..1000</a>

%e a(2) = 2 because 2 is coprime to 1, a(3) = 3 because 3, 2, 1 are coprime; a(4) cannot be 4 because 2 and 4 have 2 as great common divisor, but cannot be concat(4,5) = 45 because 45 and 3 have 3 as greatest common divisor, neither concat(4,5,6) = 456 because prime factors of 456 are 2, 3 and 19. So a(4) = concat(4,5,6,7) = 4567, a prime.

%p P:=proc(q) local a,b,k,n,ok; a:=[1]; print(1); b:=0;

%p for n from 2 to q do ok:=1; b:=b*10^(ilog10(n)+1)+n; for k from 1 to

%p nops(a) do if gcd(a[k],b)>1 then ok:=0; break; fi; od;

%p if ok=1 then print(b); a:=[op(a),b]; b:=0; fi;

%p od; print(); end: P(10^5);

%t L={1}; n=1; While[Length@L < 100, t = ++n; While[{1} != Union@ GCD[t, L], n++; t = t*10^IntegerLength[n] + n]; AppendTo[L, t]]; L (* _Giovanni Resta_, Apr 18 2016 *)

%Y Cf. A007908.

%K nonn,base,easy

%O 1,2

%A _Paolo P. Lava_, Apr 18 2016