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
Michael De Vlieger, Table of n, a(n) for n = 1..10000
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
KEYWORD
nonn,base
AUTHOR
EXTENSIONS
Sign in Name corrected by R. J. Mathar, Oct 15 2015
STATUS
approved