This site is supported by donations to The OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A055975 First differences of A003188 (decimal equivalent of the Gray Code). 10
 1, 2, -1, 4, 1, -2, -1, 8, 1, 2, -1, -4, 1, -2, -1, 16, 1, 2, -1, 4, 1, -2, -1, -8, 1, 2, -1, -4, 1, -2, -1, 32, 1, 2, -1, 4, 1, -2, -1, 8, 1, 2, -1, -4, 1, -2, -1, -16, 1, 2, -1, 4, 1, -2, -1, -8, 1, 2, -1, -4, 1, -2, -1, 64, 1, 2, -1, 4, 1, -2, -1, 8, 1, 2, -1, -4, 1, -2, -1, 16, 1, 2, -1, 4, 1, -2, -1, -8, 1, 2, -1, -4, 1, -2, -1, -32, 1, 2, -1, 4 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,2 COMMENTS Multiplicative with a(2^e) = 2^e, a(p^e) = (-1)^((p^e-1)/2) otherwise. - Mitch Harris, May 17 2005 a(A091072(n)) > 0; a(A091067(n)) < 0. - Reinhard Zumkeller, Apr 28 2012 In the binary representation of n, clear everything left of the least significant 1 bit, and negate if the bit left of it was set originally. - Ralf Stephan, Aug 23 2013 This sequence is the trace of n in the minimal alternating binary representation of n (defined at A256696). - Clark Kimberling, Apr 07 2015 LINKS Reinhard Zumkeller, Table of n, a(n) for n = 1..10000 N. J. A. Sloane, Transforms FORMULA a(2n) = 2a(n), a(2n+1) = (-1)^n. G.f. sum(k>=0, 2^k*t/(1+t^2), t=x^2^k). a(n) = 2^A007814(n) * (-1)^((n/2^A007814(n)-1)/2). - Ralf Stephan, Oct 29 2003 a((2*n-1)*2^p) = (-1)^(n+1)*2^p, p >= 0. - Johannes W. Meijer, Jan 27 2013 EXAMPLE Since A003188(n) is 0, 1, 3, 2, 6, 7, 5, 4, 12, 13, 15, 14, 10, ..., a(n) begins 1, 2, -1, 4, 1, -2, -1, 8, 1, 2, -1, 4, ... . MAPLE nmax:=100: for p from 0 to ceil(simplify(log[2](nmax))) do for n from 1 to ceil(nmax/(p+2)) do a((2*n-1)*2^p) := (-1)^(n+1)*2^p od: od: seq(a(n), n=1..nmax); # Johannes W. Meijer, Jan 27 2013 MATHEMATICA f[n_]:=BitXor[n, Floor[n/2]]; Differences[Array[f, 120, 0]] (* Harvey P. Dale, Jul 18 2011, applying Robert G. Wilson v's program from A003188 *) PROG (PARI) a(n)=((-1)^((n/2^valuation(n, 2)-1)/2)*2^valuation(n, 2) \\ Ralf Stephan (Haskell) a055975 n = a003188 n - a003188 (n-1) a055975_list = zipWith (-) (tail a003188_list) a003188_list -- Reinhard Zumkeller, Apr 28 2012 CROSSREFS The unsigned sequence |a(n)| is A006519(n) = 2^A007814(n). Cf. A003188, A006519 and A007814. MASKTRANSi transform of A053644 (conjectural). Cf. A119972, A119974, A220466. Sequence in context: A003484 A118827 A118830 * A006519 A087258 A076775 Adjacent sequences:  A055972 A055973 A055974 * A055976 A055977 A055978 KEYWORD easy,nice,sign,mult AUTHOR Alford Arnold, Jul 22 2000 EXTENSIONS More terms from Larry Reeves (larryr(AT)acm.org), Sep 05 2000 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 | More pages
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified October 23 18:27 EDT 2018. Contains 316529 sequences. (Running on oeis4.)