login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A118763 a(n) = smallest number not occurring earlier having in decimal representation to its predecessor Levenshtein distance = 1; a(0)=0. 8
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 19, 10, 11, 12, 13, 14, 15, 16, 17, 18, 28, 20, 21, 22, 23, 24, 25, 26, 27, 29, 39, 30, 31, 32, 33, 34, 35, 36, 37, 38, 48, 40, 41, 42, 43, 44, 45, 46, 47, 49, 59, 50, 51, 52, 53, 54, 55, 56, 57, 58, 68, 60, 61, 62, 63, 64, 65, 66, 67, 69, 79, 70, 71 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,3

COMMENTS

Permutation of the natural numbers; inverse: A118764; A118765(n)=a(a(n)); a(A118767(n))=A118767(n);

A118768(n) = a(n+1) - a(n);

LINKS

Robert G. Wilson v, Table of n, a(n) for n = 0..10000

Michael Gilleland, Levenshtein Distance

Index entries for sequences that are permutations of the natural numbers

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]] ]]; f[lst_] :=  Block[{k = 1, l = IntegerDigits[ lst[[-1]]]}, While[ MemberQ[lst, k] || levenshtein[l, IntegerDigits[k]] > 1, k++]; Append[lst, k]]; Nest[f, {0}, 100] (* Robert G. Wilson v, Sep 22 2016 *)

CROSSREFS

Cf. A118757.

Sequence in context: A095966 A180084 A092596 * A098488 A276597 A199344

Adjacent sequences:  A118760 A118761 A118762 * A118764 A118765 A118766

KEYWORD

nonn,base

AUTHOR

Reinhard Zumkeller, May 01 2006

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified October 21 11:15 EDT 2019. Contains 328294 sequences. (Running on oeis4.)