This site is supported by donations to The OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A103863 Hamming distance between n and A102370(n) (in binary). 3

%I

%S 0,1,1,2,0,2,2,3,0,1,1,2,1,3,3,4,0,1,1,2,0,2,2,3,0,1,1,3,2,4,4,5,0,1,

%T 1,2,0,2,2,3,0,1,1,2,1,3,3,4,0,1,1,2,0,2,2,3,0,1,2,4,3,5,5,6,0,1,1,2,

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

%N Hamming distance between n and A102370(n) (in binary).

%C a(A104235(n)) = 0.

%C The Hamming distance between two strings of the same length is the number of places where they differ. - _Robert G. Wilson v_, Apr 12 2005

%D David Applegate, Benoit Cloitre, Philippe Deléham and N. J. A. Sloane, Sloping binary numbers: a new sequence related to the binary numbers, J. Integer Seq. 8 (2005), no. 3, Article 05.3.6, 15 pp.

%D F. J. MacWilliams and N. J. A. Sloane, The Theory of Error-Correcting Codes, Elsevier/North Holland, 1978, p. 8.

%H David Applegate, Benoit Cloitre, Philippe Deléham and N. J. A. Sloane, Sloping binary numbers: a new sequence related to the binary numbers [<a href="http://neilsloane.com/doc/slopey.pdf">pdf</a>, <a href="http://neilsloane.com/doc/slopey.ps">ps</a>].

%H Saleem Bhatti, <a href="http://www.cs.ucl.ac.uk/staff/S.Bhatti/D51-notes/node30.html">Channel coding; Hamming distance</a>.

%H Alexander Bogomolny, <a href="http://www.cut-the-knot.org/do_you_know/Strings.shtml">Distance Between Strings</a>.

%H National Institute of Standards and Technology, <a href="http://www.nist.gov/dads/HTML/hammingdist.html">Hamming distance</a>.

%t f[n_] := Block[{k = 1, s = 0, l = Max[2, Floor[ Log[2, n + 1] + 2]]}, While[ k < l, If[ Mod[n + k, 2^k] == 0, s = s + 2^k]; k++ ]; s]; hammingdistance[n_] := Count[ IntegerDigits[ BitXor[n, f[n] + n], 2], 1]; Table[ hammingdistance[n], {n, 0, 104}] (* _Robert G. Wilson v_, Apr 12 2005 *)

%Y Cf. A103542.

%K nonn,easy,base

%O 0,4

%A _Philippe Deléham_, Mar 31 2005

%E More terms from _Robert G. Wilson v_, Apr 12 2005

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 May 25 04:50 EDT 2019. Contains 323539 sequences. (Running on oeis4.)