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

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A037862 a(n)=(number of digits <=1)-(number of digits >1) in base 3 representation of n. 1
 1, -1, 2, 2, 0, 0, 0, -2, 3, 3, 1, 3, 3, 1, 1, 1, -1, 1, 1, -1, 1, 1, -1, -1, -1, -3, 4, 4, 2, 4, 4, 2, 2, 2, 0, 4, 4, 2, 4, 4, 2, 2, 2, 0, 2, 2, 0, 2, 2, 0, 0, 0, -2, 2, 2, 0, 2, 2, 0, 0, 0, -2, 2, 2, 0, 2, 2, 0, 0, 0, -2, 0, 0, -2, 0, 0, -2, -2, -2, -4, 5, 5, 3 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,3 LINKS MAPLE A037862 := proc(n)     a := 0 ;     dgs := convert(n, base, 3);     for i from 1 to nops(dgs) do         if op(i, dgs)<=1 then             a := a+1 ;         else             a := a-1 ;         end if;     end do:     a ; end proc: # R. J. Mathar, Oct 16 2015 MATHEMATICA b3d[n_]:=Module[{idn=IntegerDigits[n, 3]}, Count[idn, _?(#<2&)]-Count[idn, _?(#>1&)]]; Array[b3d, 90] (* Harvey P. Dale, Nov 08 2011 *) CROSSREFS Sequence in context: A054978 A129438 A125096 * A337113 A285244 A263148 Adjacent sequences:  A037859 A037860 A037861 * A037863 A037864 A037865 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.

Last modified August 9 03:22 EDT 2022. Contains 356016 sequences. (Running on oeis4.)