login
Decimal value of the concatenation of first n even numbers in binary.
0

%I #6 Feb 20 2021 17:23:32

%S 2,20,166,2664,42634,682156,10914510,349264336,11176458770,

%T 357646680660,11444693781142,366230200996568,11719366431890202,

%U 375019725820486492,12000631226255567774,768040398480356337568,49154585502742805604386

%N Decimal value of the concatenation of first n even numbers in binary.

%e a(3)=166 because the first 3 even numbers in binary are 10 100 110, and the concatenation 10100110 in base 10 = 166. a(4)=2664 because the first 4 even numbers in binary are 10 100 110 1000, and the concatenation 101001101000 in base 10 = 2664.

%o (Python)

%o def a(n):return int("".join(bin(2*(i+1))[2:] for i in range(n)), 2)

%o print([a(n) for n in range(1, 19)]) # _Michael S. Branicky_, Feb 20 2021

%K base,easy,nonn

%O 1,1

%A _Gil Broussard_, Sep 01 2009