Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #22 May 15 2016 11:28:30
%S 0,0,0,1,0,0,0,1,1,0,0,1,1,1,0,1,1,1,1,1,0,0,0,1,1,0,0,1,1,1,0,1,1,1,
%T 1,2,1,1,1,1,1,0,0,1,1,1,0,1,1,1,1,2,1,1,1,2,2,1,1,1,1,1,0,1,1,1,1,2,
%U 1,1,1,2,2,1,1,2,2,2,1,1,1,1,1,1,0,0,0,1,1,0
%N Number of i such that d(i)>d(i-1), where Sum{d(i)*4^i: i=0,1,....,m} is base 4 representation of n.
%C From _Jeffrey Shallit_, May 15 2016: (Start)
%C A "2-regular" sequence, satisfying the recurrence relations:
%C a(4n+3) = a(n)
%C a(16n) = a(16n+1) = a(16n+2) = a(4n)
%C a(16n+5) = a(16n+6) = a(4n+1)
%C a(16n+8) = a(16n+9) = a(4n+2) + 1
%C a(16n+10) = a(4n+2)
%C a(16n+12) = a(16n+13) = a(16n+14) = a(4n+1) + 1
%C a(64n+4) = a(4n) + 1
%C a(64n+20) = a(16n+4)
%C a(64n+36) = a(4n+2) + 2
%C a(64n+52) = a(n) + 2
%C (End)
%H Michael De Vlieger, <a href="/A037819/b037819.txt">Table of n, a(n) for n = 1..10000</a>
%p A037819 := proc(n)
%p a := 0 ;
%p dgs := convert(n,base,4);
%p for i from 2 to nops(dgs) do
%p if op(i,dgs)>op(i-1,dgs) then
%p a := a+1 ;
%p end if;
%p end do:
%p a ;
%p end proc: # _R. J. Mathar_, Oct 15 2015
%t Table[Count[Differences@ IntegerDigits[n, 4], k_ /; k < 0], {n, 120}] (* _Michael De Vlieger_, May 15 2016 *)
%Y Cf. A037802.
%K nonn,base
%O 1,36
%A _Clark Kimberling_
%E Sign in Name corrected by _R. J. Mathar_, Oct 15 2015