A182336 a(n) is the least m>=n, such that the Hamming distance D(n,m)=4.
15, 14, 13, 12, 11, 10, 9, 8, 19, 18, 17, 16, 17, 16, 16, 17, 31, 30, 29, 28, 27, 26, 25, 24, 33, 32, 32, 33, 32, 33, 34, 35, 47, 46, 45, 44, 43, 42, 41, 40, 51, 50, 49, 48, 49, 48, 48, 49, 63, 62, 61, 60, 59, 58, 57, 56, 64, 65, 66, 67, 68, 69, 70, 71, 79, 78, 77, 76, 75, 74
Offset: 0
Links
- Charles R Greathouse IV, Table of n, a(n) for n = 0..10000
Crossrefs
Programs
-
PARI
hamming(n)=my(v=binary(n));sum(i=1,#v,v[i]) a(n)=my(k=n);while(hamming(bitxor(n,k++))!=4,);k \\ Charles R Greathouse IV, Apr 25 2012
Extensions
Terms corrected by Charles R Greathouse IV, Apr 25 2012
Comments