OFFSET
0,5
MAPLE
A037864 := proc(n)
a := 0 ;
dgs := convert(n, base, 5);
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, Oct 16 2015
MATHEMATICA
nd5[n_]:=Module[{idn5=IntegerDigits[n, 5], a}, a=Count[idn5, _?(#<=2&)]; 2a-Length[idn5]]; Array[nd5, 90] (* Harvey P. Dale, Oct 13 2011 *)
CROSSREFS
KEYWORD
base,sign
AUTHOR
STATUS
approved