login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A037864 a(n)=(number of digits <=2)-(number of digits >2) in base 5 representation of n. 1
1, 1, -1, -1, 2, 2, 2, 0, 0, 2, 2, 2, 0, 0, 0, 0, 0, -2, -2, 0, 0, 0, -2, -2, 3, 3, 3, 1, 1, 3, 3, 3, 1, 1, 3, 3, 3, 1, 1, 1, 1, 1, -1, -1, 1, 1, 1, -1, -1, 3, 3, 3, 1, 1, 3, 3, 3, 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 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,5
LINKS
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
Sequence in context: A004541 A178045 A321300 * A285635 A181674 A181676
KEYWORD
base,sign
AUTHOR
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 09:18 EDT 2024. Contains 371935 sequences. (Running on oeis4.)