Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #9 Jul 13 2013 12:01:54
%S 1,1,2,1,2,3,4,4,4,3,3,4,4,4,5,4,3,4,3,4,5,4,4,5,6,5,6,7,8,9,10,10,11,
%T 11,10,11,11,12,13,13,13,13,12,11,11,10,11,11,10,10,10,11,10,10,11,12,
%U 12,13,13,13,13,12,12,12,13,13,13,13,14,13
%N (# 1's)-(# 0's) in first n terms of A003137.
%H Reinhard Zumkeller, <a href="/A030339/b030339.txt">Table of n, a(n) for n = 1..10000</a>
%o (Haskell)
%o a030339 n = a030339_list !! (n-1)
%o a030339_list = scanl1
%o (\u v -> u + fromEnum (v == 1) - fromEnum (v == 0)) a003137_list
%o -- _Reinhard Zumkeller_, Feb 21 2013
%Y Cf. A030340.
%K nonn
%O 1,3
%A _Clark Kimberling_