login

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

Take the left or right binary concatenation of the numbers 1 to n, whichever is greater, delete digits identical to corresponding digits in the other concatenation, condense the remaining digits, and convert to decimal.
0

%I #2 Mar 31 2012 20:25:48

%S 0,2,2,2,44,42,178,812,52,11682,44585,52778,3222,727657,15264354,

%T 928184,60925872,15976986770,4166367305,785545793868,11730991244,

%U 11804109800746,41522369301,3574301245885612,198659132140236

%N Take the left or right binary concatenation of the numbers 1 to n, whichever is greater, delete digits identical to corresponding digits in the other concatenation, condense the remaining digits, and convert to decimal.

%t Module[{l,r,d,ldump,larger,rdump},l = {}; r = {}; Table[d = IntegerDigits[x, 2]; l = Flatten[{l, d}]; r = Flatten[{d, r}]; If[x > 1, ldump = l; rdump = r; While[First[ldump] == First[rdump], ldump = Rest[ldump]; rdump = Rest[rdump]]; If[First[ldump] == 1, larger = ldump, larger = rdump]; FromDigits[Pick[larger, OddQ[ldump + rdump]], 2], 0], {x, 1, DESIRED_NUMBER_OF_TERMS}]]

%Y Cf. A047778, A098780

%K base,easy,nonn

%O 1,2

%A _Dylan Hamilton_, Oct 14 2010