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!)
A367797 The successive digits of the number k are the successive "inside Levenshtein distances" of k (except for the last digit of k). See the Comment section for the definition of an "inside Levenshtein distance". 0
10, 12, 13, 14, 15, 16, 17, 18, 19, 111, 211, 2020, 2122, 2230, 2231, 2234, 2235, 2236, 2237, 2238, 2239, 3121, 31131, 32131, 32233, 32340, 32341, 32345, 32346, 32347, 32348, 32349, 42232, 422242, 432242, 432450, 432451, 432456, 432457, 432458, 432459, 433242, 433344, 532342, 5433353, 5433455, 5433560 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
Let's consider 2023 and compute the successive traditional Levenshtein distances between 2 and 023, 20 and 23, 202 and 3 (the so-called inside Lds).
We have:
Ld 2<>023 = 2,
Ld 20<>23 = 1,
Ld 202<>3 = 3.
The successive Lds of 2023 are 2, 1 and 3.
LINKS
Éric Angelini, Inside Levenshtein distances, Personal blog, November 2023.
EXAMPLE
a(1) = 10 has an iLd of 1 (the Levenshtein distance between 1 and 0) and this iLd of 1 is the first digit of a(1);
a(47) = 5433560 is in the sequence because its successive Lds are:
Ld 5<>433560 = 5
Ld 54<>33560 = 4
Ld 543<>3560 = 3
Ld 5433<>560 = 3
Ld 54335<>60 = 5
Ld 543356<>0 = 6.
We see that the rightmost column above reproduces a(47), except for the last digit.
PROG
(Python)
from Levenshtein import distance as Ld
def ok(n):
s = str(n)
if n < 10: return False # convention, though condition is vacuously True
return all(Ld(s[:i+1], s[i+1:]) == int(s[i]) for i in range(len(s)-1))
print([k for k in range(10**7) if ok(k)]) # Michael S. Branicky, Dec 01 2023
CROSSREFS
Cf. A367638.
Sequence in context: A105959 A059504 A083310 * A065206 A261925 A083476
KEYWORD
base,nonn
AUTHOR
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 August 25 08:31 EDT 2024. Contains 375422 sequences. (Running on oeis4.)