The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A216430 (-1)^A081603(n), parity of the number of 2's in the ternary expansion of n. 1
 1, -1, 1, 1, -1, -1, -1, 1, 1, 1, -1, 1, 1, -1, -1, -1, 1, -1, -1, 1, -1, -1, 1, 1, 1, -1, 1, 1, -1, 1, 1, -1, -1, -1, 1, 1, 1, -1, 1, 1, -1, -1, -1, 1, -1, -1, 1, -1, -1, 1, 1, 1, -1, -1, -1, 1, -1, -1, 1, 1, 1, -1, -1, -1, 1, -1, -1, 1, 1, 1, -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 1 LINKS A. Aksenov, The Newman phenomenon and Lucas sequence, arXiv:1108.5352, chapter 6. EXAMPLE a(7) = -1 because 7 is 21 (has one 2s) in base 3, and (-1)^1 = -1. a(8) = 1 because 8 is 22 (has two 2s) in base 3, and (-1)^2 = 1. MAPLE A081603 := proc(n)     local a, d ;     a := 0 ;     for d in convert(n, base, 3) do         if d = 2 then             a := a+1 ;         end if;     end do;     a; end proc: A216430 := proc(n)     (-1)^A081603(n) ; end proc: seq(A216430(n), n=1..90) ; MATHEMATICA Table[(-1)^DigitCount[n, 3, 2], {n, 90}] (* Alonso del Arte, Sep 08 2012 *) CROSSREFS Sequence in context: A209661 A033999 A000012 * A232544 A309873 A162511 Adjacent sequences:  A216427 A216428 A216429 * A216431 A216432 A216433 KEYWORD sign,easy,base AUTHOR R. J. Mathar, Sep 08 2012 STATUS approved

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

Last modified April 20 23:46 EDT 2021. Contains 343143 sequences. (Running on oeis4.)