A091092 In binary representation: minimal number of editing steps (delete, insert or substitute) to transform n into n^2.
0, 0, 1, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 6, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 5, 5, 5, 6, 6, 6, 7, 7, 6, 6, 6, 6, 6, 6, 6, 7, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 6, 6, 7, 7, 6, 6, 6, 6, 6, 7, 7, 7, 7, 6, 7, 8, 8, 7, 8, 8, 7, 7, 7, 7, 7, 8
Offset: 0
Examples
a(7)=3: 7->'111', 3 x insert a 0 between the last two 1's: '110001'->49=7^2.
Links
- Alois P. Heinz, Table of n, a(n) for n = 0..20000
- Eric Weisstein's World of Mathematics, Square Number
- Eric Weisstein's World of Mathematics, Binary
- Wikipedia, Levenshtein Distance
- Index entries for sequences related to binary expansion of n
Comments