login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

Largest number that can be written in binary as concatenation of (n - k) and (n + k), 0 <= k <= n.
3

%I #10 Oct 02 2018 16:31:25

%S 0,3,10,20,36,45,72,104,136,153,170,208,272,336,400,464,528,561,594,

%T 627,660,693,800,928,1056,1184,1312,1440,1568,1696,1824,1952,2080,

%U 2145,2210,2275,2340,2405,2470,2535,2600,2665,2730,2880,3136,3392,3648,3904

%N Largest number that can be written in binary as concatenation of (n - k) and (n + k), 0 <= k <= n.

%C Largest term in row n of A246830.

%H Reinhard Zumkeller, <a href="/A246520/b246520.txt">Table of n, a(n) for n = 0..1000</a>

%t Table[Max[FromDigits[#,2]&/@Table[Join[IntegerDigits[n-k,2],IntegerDigits[ n+k,2]],{k,0,n}]],{n,0,50}] (* _Harvey P. Dale_, Oct 02 2018 *)

%o (Haskell)

%o a246520 = maximum . a246830_row

%o (Python)

%o def A246520(n):

%o ....return(max(int(bin(n-k)[2:]+bin(n+k)[2:],2) for k in range(n+1)))

%o # _Chai Wah Wu_, Sep 07 2014

%Y Cf. A246830, A007088, A246701 (first dfferences).

%K nonn,base

%O 0,2

%A _Reinhard Zumkeller_, Sep 04 2014