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!)
A037863 a(n)=(number of digits <=1)-(number of digits >1) in base 4 representation of n. 3

%I #7 Oct 16 2015 16:28:53

%S 1,-1,-1,2,2,0,0,0,0,-2,-2,0,0,-2,-2,3,3,1,1,3,3,1,1,1,1,-1,-1,1,1,-1,

%T -1,1,1,-1,-1,1,1,-1,-1,-1,-1,-3,-3,-1,-1,-3,-3,1,1,-1,-1,1,1,-1,-1,

%U -1,-1,-3,-3,-1,-1,-3,-3,4,4,2,2,4,4,2,2,2,2,0,0

%N a(n)=(number of digits <=1)-(number of digits >1) in base 4 representation of n.

%p A037863 := proc(n)

%p a := 0 ;

%p dgs := convert(n,base,4);

%p for i from 1 to nops(dgs) do

%p if op(i,dgs)<=1 then

%p a := a+1 ;

%p else

%p a := a-1 ;

%p end if;

%p end do:

%p a ;

%p end proc: # _R. J. Mathar_, Oct 16 2015

%K base,sign

%O 0,4

%A _Clark Kimberling_

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 22:17 EDT 2024. Contains 371964 sequences. (Running on oeis4.)