cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A182336 a(n) is the least m>=n, such that the Hamming distance D(n,m)=4.

Original entry on oeis.org

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

Views

Author

Vladimir Shevelev, Apr 25 2012

Keywords

Comments

Or (see comment in A206853) a(n)=n<+>4.
Conjecture: for n > 96, n + 1 <= a(n) <= 9n/8 + 1. - Charles R Greathouse IV, Apr 25 2012

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