login
Binary and decimal representation of n concatenated.
1

%I #16 Nov 17 2022 16:43:57

%S 11,102,113,1004,1015,1106,1117,10008,10019,101010,101111,110012,

%T 110113,111014,111115,1000016,1000117,1001018,1001119,1010020,1010121,

%U 1011022,1011123,1100024,1100125,1101026,1101127,1110028,1110129,1111030,1111131,10000032,10000133

%N Binary and decimal representation of n concatenated.

%C The range of the sequence is generated by the context-sensitive grammar with decimal digits as terminals, {s,x,y,z,c,u,v,L,R} as non-terminals, s as axiom and the following rules (e is the empty word): s->L1xy1R, L->e, R->e, xy->e, 0x->1u, 1x->x0, Lx->L1u, u1->1u, u0->0u, uy->uz, zi->iz for 0<=i<=9, ziR->vjR for j=i+1 and 0<=i<9, z9R->c0R, ic->vj for j=i+1 and 0<=i<9, 9c->c0, iv->vi for 0<=i<=9, uv->xy and uc->xy1.

%H Michael S. Branicky, <a href="/A087744/b087744.txt">Table of n, a(n) for n = 1..10000</a>

%p a:= n-> parse(cat(convert(n, binary), n)):

%p seq(a(n), n=1..35); # _Alois P. Heinz_, Jul 31 2022

%t Table[FromDigits[Join[IntegerDigits[n,2],IntegerDigits[n]]],{n,30}] (* _Harvey P. Dale_, Dec 13 2011 *)

%o (Python)

%o def a(n): return int(bin(n)[2:]+str(n))

%o print([a(n) for n in range(1, 34)]) # _Michael S. Branicky_, Jul 31 2022

%o (PARI) a(n) = fromdigits(binary(n))*10^(logint(n,10)+1) + n; \\ _Kevin Ryde_, Nov 10 2022

%Y Cf. A000027, A007088.

%K nonn,base,easy

%O 1,1

%A _Reinhard Zumkeller_, Oct 02 2003

%E a(30) and beyond from _Michael S. Branicky_, Jul 31 2022