login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A173427 Decimal value a(n) of the binary number b(n) obtained by starting from 1, sequentially concatenating all binary numbers up to n and then sequentially concatenating all binary numbers from n-1 down to 1. 23

%I

%S 1,13,221,7069,451997,28931485,1851651485,237010810269,60674754606493,

%T 15532737233548701,3976380732916495773,1017953467644930815389,

%U 260596087717395474544029,66712598455657932715586973

%N Decimal value a(n) of the binary number b(n) obtained by starting from 1, sequentially concatenating all binary numbers up to n and then sequentially concatenating all binary numbers from n-1 down to 1.

%F a(n) = binary_to_decimal(concatenate(1,10,11,..., binary(n-2), binary(n-1), binary(n), binary(n-1), binary(n-2),..., 11, 10, 1))

%e a(1)=binary_to_decimal(1)=1, a(2)=binary_to_decimal(1101)=13, a(3)=binary_to_decimal(11011101)=221, a(4)=binary_to_decimal(1101110011101)=7069 etc.

%o (PARI) a(n)=sum(i=1,#n=concat(vector(n*2-1,k,binary(min(k, n*2-k)))),n[i]<<(#n-i))

%o (PARI) A173427(n)={my(s=0,s1=0,t=0,b=0);for(k=1,n-1,s1+=k<<t+=b; k>>b&&b++;s=s<<b+k);t+=b;n>>b&&b++;(s<<b+n)<<t+s1} \\ _M. F. Hasler_, Aug 06 2015

%K base,nonn

%O 1,2

%A _Umut Uludag_, Feb 18 2010

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified November 19 00:12 EST 2019. Contains 329310 sequences. (Running on oeis4.)