login
A037865
a(n)=(number of digits <=2)-(number of digits >2) in base 6 representation of n.
1
1, 1, -1, -1, -1, 2, 2, 2, 0, 0, 0, 2, 2, 2, 0, 0, 0, 0, 0, 0, -2, -2, -2, 0, 0, 0, -2, -2, -2, 0, 0, 0, -2, -2, -2, 3, 3, 3, 1, 1, 1, 3, 3, 3, 1, 1, 1, 3, 3, 3, 1, 1, 1, 1, 1, 1, -1, -1, -1, 1, 1, 1, -1, -1, -1, 1, 1, 1, -1, -1, -1, 3, 3, 3, 1, 1, 1, 3, 3, 3, 1
OFFSET
1,6
MAPLE
A037865 := proc(n)
a := 0 ;
dgs := convert(n, base, 6);
for i from 1 to nops(dgs) do
if op(i, dgs)<=2 then
a := a+1 ;
else
a := a-1 ;
end if;
end do:
a ;
end proc: # R. J. Mathar, Jan 27 2025
CROSSREFS
Sequence in context: A163326 A028953 A348648 * A039969 A039967 A258133
KEYWORD
base,sign
STATUS
approved