|
Search: id:A080950
|
|
|
| A080950 |
|
Number of numbers that differ from n in binary representation by exactly one edit-operation: deletion, insertion, or substitution. |
|
+0 2
|
|
| 2, 3, 6, 5, 7, 8, 8, 7, 9, 10, 11, 10, 10, 11, 10, 9, 11, 12, 13, 12, 13, 14, 13, 12, 12, 13, 14, 13, 12, 13, 12, 11, 13, 14, 15, 14, 15, 16, 15, 14, 15, 16, 17, 16, 15, 16, 15, 14, 14, 15, 16, 15, 16, 17, 16, 15, 14, 15, 16, 15, 14, 15, 14, 13, 15, 16, 17, 16, 17, 18, 17, 16, 17
(list; graph; listen)
|
|
|
OFFSET
|
0,1
|
|
|
COMMENT
|
a(n) = #{i: LD-2(n,i)=1}, where LD-2 is the Levenshtein distance on binary strings.
|
|
LINKS
|
Michael Gilleland, Levenshtein Distance. [It has been suggested that this algorithm gives incorrect results sometimes. - njas]
|
|
EXAMPLE
|
n=6: binary representation of numbers at Levenshtein distance 1 from 6='110': {10, 11, 100, 111, 1010, 1100, 1101, 1110}, so a(6)=8.
n=42: binary representation of numbers at Levenshtein distance 1 from 42='101010': {10010, 10100, 10101, 10110, 11010, 100010, 101000, 101011, 101110, 111010, 1001010, 1010010, 1010100, 1010101, 1010110, 1011010, 1101010}, therefore a(42)=17.
|
|
CROSSREFS
|
Cf. A080910.
Sequence in context: A076734 A097723 A087786 this_sequence A023852 A048750 A035493
Adjacent sequences: A080947 A080948 A080949 this_sequence A080951 A080952 A080953
|
|
KEYWORD
|
nonn,base
|
|
AUTHOR
|
Reinhard Zumkeller (reinhard.zumkeller(AT)lhsystems.com), Apr 02 2003
|
|
|
Search completed in 0.002 seconds
|