The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A115779 Consider the Levenshtein distance between k considered as a decimal string and k considered as a binary string. Then a(n) is the greatest number m such that the Levenshtein distance is n or 0 if no such number exists. 2
1, 0, 11, 15, 111, 121, 1011, 1111, 2011, 11111, 16111, 111111, 131011, 1011111, 1111111, 2011111, 11111111, 16111111, 111111111, 131111111, 1011111111, 1111111111, 2111111111, 11111111111 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,3
COMMENTS
Difference between A115779&A115778: 1, 0, 9, 11, 103, 99, 979, 1047, 1789, 10855, 15599, 109067, 128789, 1006889, 1102919, 1988889, 11078343, ...,.
LINKS
FORMULA
a(1)=0 since no number satisfies the definition and generally a(n)>= 2^(n+1).
MATHEMATICA
levenshtein[s_List, t_List] := Module[{d, n = Length@s, m = Length@t}, Which[s === t, 0, n == 0, m, m == 0, n, s != t, d = Table[0, {m + 1}, {n + 1}]; d[[1, Range[n + 1]]] = Range[0, n]; d[[Range[m + 1], 1]] = Range[0, m]; Do[d[[j + 1, i + 1]] = Min[d[[j, i + 1]] + 1, d[[j + 1, i]] + 1, d[[j, i]] + If[s[[i]] === t[[j]], 0, 1]], {j, m}, {i, n}]; d[[ -1, -1]]]];
t = Table[0, {25}]; f[n_] := levenshtein[ IntegerDigits[n], IntegerDigits[n, 2]]; Do[ t[[f@n+1]] = n, {n, 10^6}]; t
CROSSREFS
Sequence in context: A219389 A217085 A267123 * A147339 A147377 A147333
KEYWORD
more,nonn,base
AUTHOR
Robert G. Wilson v, Jan 26 2006
EXTENSIONS
a(18)-a(23) from Lars Blomberg, Jul 16 2015
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified June 7 22:01 EDT 2024. Contains 373206 sequences. (Running on oeis4.)