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 A037809 #25 Jan 04 2025 22:33:38 %S A037809 0,0,1,1,1,1,2,2,2,1,2,2,2,2,3,3,3,2,3,2,2,2,3,3,3,2,3,3,3,3,4,4,4,3, %T A037809 4,3,3,3,4,3,3,2,3,3,3,3,4,4,4,3,4,3,3,3,4,4,4,3,4,4,4,4,5,5,5,4,5,4, %U A037809 4,4,5,4,4,3,4,4,4,4,5,4,4,3,4,3,3,3,4,4,4,3 %N A037809 Number of i such that d(i) <= d(i-1), where Sum_{i=0..m} d(i)*2^i is the base-2 representation of n. %H A037809 Ralf Stephan, <a href="/somedcgf.html">Some divide-and-conquer sequences ...</a> %H A037809 Ralf Stephan, <a href="/A079944/a079944.ps">Table of generating functions</a> %F A037809 From _Ralf Stephan_, Oct 05 2003: (Start) %F A037809 G.f.: -x/(1-x) + 1/(1-x) * Sum_{k>=0} (t + t^3 + t^4)/(1 + t + t^2 + t^3), where t=x^2^k. %F A037809 a(n) = A056973(n) + A000120(n) - 1. %F A037809 a(n) = b(n) - 1, with b(0)=0, b(2n) = b(n) + [n even], b(2n+1) = b(n) + 1. (End) %e A037809 The base-2 representation of n=4 is 100 with d(0)=0, d(1)=0, d(2)=1. Only d(1) <= d(0) is true, so a(4)=1. - _R. J. Mathar_, Oct 16 2015 %p A037809 A037809 := proc(n) %p A037809 a := 0 ; %p A037809 dgs := convert(n,base,2); %p A037809 for i from 2 to nops(dgs) do %p A037809 if op(i,dgs)<=op(i-1,dgs) then %p A037809 a := a+1 ; %p A037809 end if; %p A037809 end do: %p A037809 a ; %p A037809 end proc: # _R. J. Mathar_, Oct 16 2015 %Y A037809 Cf. A033265. %K A037809 nonn,base %O A037809 1,7 %A A037809 _Clark Kimberling_ %E A037809 Sign in Name corrected by _R. J. Mathar_, Oct 16 2015