OFFSET
0,10
MAPLE
A037869 := proc(n)
a := 0 ;
dgs := convert(n, base, 10);
for i from 1 to nops(dgs) do
if op(i, dgs)<=4 then
a := a+1 ;
else
a := a-1 ;
end if;
end do:
a ;
end proc:
seq(A037869(n), n=1..100) ; # R. J. Mathar, Jul 31 2024
MATHEMATICA
f[n_]:=Module[{dcn=Partition[RotateRight[DigitCount[n]], 5]}, Total[First[dcn]]-Total[Last[dcn]]]; Array[f, 90] (* Harvey P. Dale, May 17 2011 *)
CROSSREFS
KEYWORD
base,sign
AUTHOR
STATUS
approved