%I #23 Oct 28 2016 12:40:09
%S 1,2,3,4,6,8,5,20,22,210,10,12,7,24,26,28,212,14,16,18,9,40,42,44,46,
%T 214,30,48,32,60,101,216,34,62,36,64,38,66,50,68,80,52,82,84,54,86,88,
%U 56,200,218,58,202,230,2010,70,204,206,72,208,220,74,222,224,76,226,228,78,240,242,90,244,246,2012,92,248
%N Each odd term "t" of the sequence is followed by t even terms and each odd digit "k" of the sequence is followed by k even digits.
%C After a(1) = 1, the sequence is always extended with the smallest integer not yet present which does not lead to a contradiction.
%C In a private mail to Eric Angelini, Lars Blomberg wrote about the b-file: "Only the odd terms 1, 3, 5, 7, 9, 101, 103, 21, 201 and 2000001 [are in the b-file]; so the sequence will continue with 2000001 even numbers and odd one."
%C The sequence could be started with the even term a(0) = 0, which would not impose any restriction and thus be followed by the next smallest possible integer, a(1) = 1. The sequence is not a permutation of the positive integers because some numbers (11, 13, 15, 17, 19, 31, ..., 97, 99, 100, 102,..., 110, 111, ..., 119, 130, ...) = A277694 can never occur. (The odd digit 1 must be followed by 1 even digit, etc.) The previous comment shows why odd terms occur late, but probably (I conjecture) any odd term which is not excluded a priori will occur sooner or later. - _M. F. Hasler_, Oct 27 2016
%H Lars Blomberg, <a href="/A277623/b277623.txt">Table of n, a(n) for n = 1..461</a>
%e There are respectively 1 even term after "1" (this is "2"), then 3 even terms after "3" (they are 4, 6 and 8), then 5 even terms after "5" (they are 20, 22, 210, 10 and 12), then 7 even terms after "7" (they are 24, 26, 28, 212, 14, 16 and 18), etc.
%e But there are also respectively 1 even digit after "1" (this is "2"), then 3 even digits after "3" (they are 4, 6 and 8), then 5 even digits after "5" (they are 2, 0, 2, 2 and 2), then 1 even digit after the "1" of "210" (this is the "0" of "210"), then 1 even digit after the "1" of "10" (this is the "0" of "10"), then 1 even digit after the "1" of "12" (this is the "2" of "12"), then 7 even digits after "7" (they are 2, 4, 2, 6, 2, 8 and 2), etc.
%o (PARI) a=u=[c=d=1];(chk(k,c)=!for(i=1,#k=digits(k),!c==bittest(k[i],0)||return;c--<0&&c=k[i])); for(n=1,99,for(k=u[1]+1,9e9,c&&bittest(k,0)&&next;setsearch(u,k)&&next;chk(k,d)||next;print1(k","); a=concat(a,k);u=setunion(u,[k]);c--<0&&c=k;for(i=1,#k=digits(k),d--<0&&d=k[i]);break));a \\ _M. F. Hasler_, Oct 27 2016
%K nonn,base
%O 1,2
%A _Eric Angelini_ and _Lars Blomberg_, Oct 24 2016
|