This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A256702 #8 Apr 13 2015 09:40:34 %S A256702 0,0,1,0,4,2,1,0,8,8,9,4,4,2,1,0,16,16,17,16,20,18,17,8,8,8,9,4,4,2,1, %T A256702 0,32,32,33,32,36,34,33,32,40,40,41,36,36,34,33,16,16,16,17,16,20,18, %U A256702 17,8,8,8,9,4,4,2,1,0,64,64,65,64,68,66,65,64,72 %N A256702 Nonpositive part of the minimal alternating binary representation of n (defined at A256696). %H A256702 Clark Kimberling, <a href="/A256702/b256702.txt">Table of n, a(n) for n = 1..1000</a> %F A256702 A256701(n) - A256702(n) = n. %e A256702 R(1) = 1; positive part 1, nonpositive part 0. %e A256702 R(2) = 2; positive part 2, nonpositive part 0. %e A256702 R(3) = 4 - 1; positive part 4, nonpositive part 1. %e A256702 R(11) = 16 - 8 + 4 - 1; positive part 16 + 4 = 20; nonpositive part 8 + 1 = 9. %t A256702 b[n_] := 2^n; bb = Table[b[n], {n, 0, 40}]; %t A256702 s[n_] := Table[b[n + 1], {k, 1, b[n]}]; %t A256702 h[0] = {1}; h[n_] := Join[h[n - 1], s[n - 1]]; %t A256702 g = h[10]; Take[g, 100]; r[0] = {0}; %t A256702 r[n_] := If[MemberQ[bb, n], {n}, Join[{g[[n]]}, -r[g[[n]] - n]]] %t A256702 Table[Total[Abs[r[n]]], {n, 1, 100}] (* A073122 *) %t A256702 u = Table[Total[(Abs[r[n]] + r[n])/2], {n, 1, 100}] (* A256701 *) %t A256702 v = Table[Total[(Abs[r[n]] - r[n])/2], {n, 1, 100}] (* A256702 *) %Y A256702 Cf. A256696, A073122, A256701. %K A256702 nonn,easy %O A256702 1,5 %A A256702 _Clark Kimberling_, Apr 09 2015