login
A037819
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.
2
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, 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, 1, 1, 1, 2, 2, 1, 1, 2, 2, 2, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 0
OFFSET
1,36
COMMENTS
From Jeffrey Shallit, May 15 2016: (Start)
A "2-regular" sequence, satisfying the recurrence relations:
a(4n+3) = a(n)
a(16n) = a(16n+1) = a(16n+2) = a(4n)
a(16n+5) = a(16n+6) = a(4n+1)
a(16n+8) = a(16n+9) = a(4n+2) + 1
a(16n+10) = a(4n+2)
a(16n+12) = a(16n+13) = a(16n+14) = a(4n+1) + 1
a(64n+4) = a(4n) + 1
a(64n+20) = a(16n+4)
a(64n+36) = a(4n+2) + 2
a(64n+52) = a(n) + 2
(End)
LINKS
MAPLE
A037819 := proc(n)
a := 0 ;
dgs := convert(n, base, 4);
for i from 2 to nops(dgs) do
if op(i, dgs)>op(i-1, dgs) then
a := a+1 ;
end if;
end do:
a ;
end proc: # R. J. Mathar, Oct 15 2015
MATHEMATICA
Table[Count[Differences@ IntegerDigits[n, 4], k_ /; k < 0], {n, 120}] (* Michael De Vlieger, May 15 2016 *)
CROSSREFS
Cf. A037802.
Sequence in context: A325616 A056978 A321761 * A090405 A237837 A365126
KEYWORD
nonn,base
EXTENSIONS
Sign in Name corrected by R. J. Mathar, Oct 15 2015
STATUS
approved