A207460 Let a(1) = 4. For n > 1, a(n) is the least number greater than a(n-1) such that the Hamming distance D(a(n-1),a(n)) = 4.
4, 11, 16, 31, 35, 44, 49, 62, 70, 73, 82, 93, 97, 110, 112, 127, 143, 145, 158, 162, 173, 176, 191, 199, 200, 211, 220, 224, 239, 241, 254, 286, 290, 301, 304, 319, 327, 328, 339, 348, 352, 367, 369, 382, 398, 400, 415, 419
Offset: 1
Links
- Harvey P. Dale, Table of n, a(n) for n = 1..1000
Crossrefs
Programs
-
Mathematica
nxt[n_]:=Module[{k=n+1},While[HammingDistance[PadLeft[IntegerDigits[ n,2],IntegerLength[ k,2]],IntegerDigits[k,2]]!=4,k++];k]; NestList[ nxt,4,50] (* Harvey P. Dale, Nov 07 2020 *)
Comments