A322285 Triangle read by rows: T(n,k) is the Damerau-Levenshtein distance between n and k in binary representation, 0 <= k <= n.
0, 1, 0, 1, 1, 0, 2, 1, 1, 0, 2, 2, 1, 2, 0, 2, 2, 1, 1, 1, 0, 2, 2, 1, 1, 1, 1, 0, 3, 2, 2, 1, 2, 1, 1, 0, 3, 3, 2, 3, 1, 2, 2, 3, 0, 3, 3, 2, 2, 1, 1, 2, 2, 1, 0, 3, 3, 2, 2, 1, 1, 1, 2, 1, 1, 0, 3, 3, 2, 2, 2, 1, 2, 1, 2, 1, 1, 0, 3, 3, 2, 2, 1, 2, 1, 2, 1, 2, 1, 2, 0, 3, 3, 2, 2, 2, 1, 1, 1, 2, 1, 2, 1, 1, 0
Offset: 0
Examples
The triangle T(n, k) begins: n\k 0 1 2 3 4 5 6 7 8 9 10 11 12 13 ... 0: 0 1: 1 0 2: 1 1 0 3: 2 1 1 0 4: 2 2 1 2 0 5: 2 2 1 1 1 0 6: 2 2 1 1 1 1 0 7: 3 2 2 1 2 1 1 0 8: 3 3 2 3 1 2 2 3 0 9: 3 3 2 2 1 1 2 2 1 0 10: 3 3 2 2 1 1 1 2 1 1 0 11: 3 3 2 2 2 1 2 1 2 1 1 0 12: 3 3 2 2 1 2 1 2 1 2 1 2 0 13: 3 3 2 2 2 1 1 1 2 1 2 1 1 0 ... The distance between the binary representations of 46 and 25 is 3 (via the edits "101110" - "10111" - "11011" - "11001"), so T(46,25) = 3.
Links
- Pontus von Brömssen, Rows n = 0..200, flattened
- Wikipedia, Damerau-Levenshtein distance
- Index entries for sequences related to binary expansion of n
Crossrefs
Cf. A152487.
Comments