login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A055975 First differences of A003188 (decimal equivalent of the Gray Code). 10

%I

%S 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,

%T -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,

%U -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

%N First differences of A003188 (decimal equivalent of the Gray Code).

%C Multiplicative with a(2^e) = 2^e, a(p^e) = (-1)^((p^e-1)/2) otherwise. - _Mitch Harris_, May 17 2005

%C a(A091072(n)) > 0; a(A091067(n)) < 0. - _Reinhard Zumkeller_, Apr 28 2012

%C 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

%C This sequence is the trace of n in the minimal alternating binary representation of n (defined at A256696). - _Clark Kimberling_, Apr 07 2015

%H Reinhard Zumkeller, <a href="/A055975/b055975.txt">Table of n, a(n) for n = 1..10000</a>

%H N. J. A. Sloane, <a href="/transforms.txt">Transforms</a>

%H <a href="/index/Bi#binary">Index entries for sequences related to binary expansion of n</a>

%F 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

%F a((2*n-1)*2^p) = (-1)^(n+1)*2^p, p >= 0. - _Johannes W. Meijer_, Jan 27 2013

%e 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, ... .

%p 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

%t 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 *)

%o (PARI) a(n)=((-1)^((n/2^valuation(n,2)-1)/2)*2^valuation(n,2) \\ _Ralf Stephan_

%o (Haskell)

%o a055975 n = a003188 n - a003188 (n-1)

%o a055975_list = zipWith (-) (tail a003188_list) a003188_list

%o -- _Reinhard Zumkeller_, Apr 28 2012

%Y The unsigned sequence |a(n)| is A006519(n) = 2^A007814(n).

%Y Cf. A003188, A006519 and A007814.

%Y MASKTRANSi transform of A053644 (conjectural).

%Y Cf. A119972, A119974, A220466.

%K easy,nice,sign,mult

%O 1,2

%A _Alford Arnold_, Jul 22 2000

%E More terms from Larry Reeves (larryr(AT)acm.org), Sep 05 2000

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.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 18 10:54 EDT 2019. Contains 322209 sequences. (Running on oeis4.)