Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A115779
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
%I A115779
%S A115779 1,0,11,15,111,121,1011,1111,2011,11111,16111,111111,131011,1011111,
%T A115779 1111111,2011111,11111111,16111111
%N 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.
%C A115779 Difference between A115779&A115778: 1, 0, 9, 11, 103, 99, 979, 1047, 
               1789, 10855, 15599, 109067, 128789, 1006889, 1102919, 1988889, 11078343, 
               ...,.
%F A115779 a(1)=0 since no number satisfies the definition and generally a(n)>= 
               2^(n+1).
%t A115779 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 A115779 t = Table[0, {25}]; f[n_] := levenshtein[ IntegerDigits[n], IntegerDigits[n, 
               2]]; Do[ t[[f@n+1]] = n, {n, 10^6}]; t
%Y A115779 Cf. A000027, A007088, A115777.
%Y A115779 Sequence in context: A097512 A032490 A068483 this_sequence A147339 A147377 
               A147333
%Y A115779 Adjacent sequences: A115776 A115777 A115778 this_sequence A115780 A115781 
               A115782
%K A115779 more,nonn
%O A115779 0,3
%A A115779 Robert G. Wilson v (rgwv(AT)rgwv.com), Jan 26 2006

    
page 1

Search completed in 0.001 seconds

Lookup | Welcome | Find friends | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
More pages | Superseeker | Maintained by N. J. A. Sloane (njas@research.att.com)

Last modified December 9 18:50 EST 2009. Contains 170568 sequences.


AT&T Labs Research