Take the n-th number which is just a sequence of 1's and 2's (A007931): if the first k digits in order are the same as the last k digits in order then put 1 in the k-th from right digit of a(n), otherwise put a zero.

A059941

Take the n-th number which is just a sequence of 1's and 2's (A007931): if the first k digits in order are the same as the last k digits in order then put 1 in the k-th from right digit of a(n), otherwise put a zero.

Terms

    a(0) =1a(1) =1a(2) =11a(3) =10a(4) =10a(5) =11a(6) =111a(7) =100a(8) =101a(9) =100a(10) =100a(11) =101a(12) =100a(13) =111a(14) =1111a(15) =1000a(16) =1001a(17) =1000a(18) =1001a(19) =1010a(20) =1001a(21) =1000a(22) =1000a(23) =1001a(24) =1010a(25) =1001a(26) =1000a(27) =1001a(28) =1000a(29) =1111

External references