cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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".

This page as a plain text file.
%I A367797 #14 Dec 01 2023 15:51:48
%S A367797 10,12,13,14,15,16,17,18,19,111,211,2020,2122,2230,2231,2234,2235,
%T A367797 2236,2237,2238,2239,3121,31131,32131,32233,32340,32341,32345,32346,
%U A367797 32347,32348,32349,42232,422242,432242,432450,432451,432456,432457,432458,432459,433242,433344,532342,5433353,5433455,5433560
%N 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".
%C A367797 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).
%C A367797 We have:
%C A367797   Ld 2<>023 = 2,
%C A367797   Ld 20<>23 = 1,
%C A367797   Ld 202<>3 = 3.
%C A367797 The successive Lds of 2023 are 2, 1 and 3.
%H A367797 Éric Angelini, <a href="https://cinquantesignes.blogspot.com/2023/11/inside-levenshtein-distances.html">Inside Levenshtein distances</a>, Personal blog, November 2023.
%e A367797 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);
%e A367797 a(47) = 5433560 is in the sequence because its successive Lds are:
%e A367797   Ld 5<>433560 = 5
%e A367797   Ld 54<>33560 = 4
%e A367797   Ld 543<>3560 = 3
%e A367797   Ld 5433<>560 = 3
%e A367797   Ld 54335<>60 = 5
%e A367797   Ld 543356<>0 = 6.
%e A367797 We see that the rightmost column above reproduces a(47), except for the last digit.
%o A367797 (Python)
%o A367797 from Levenshtein import distance as Ld
%o A367797 def ok(n):
%o A367797     s = str(n)
%o A367797     if n < 10: return False # convention, though condition is vacuously True
%o A367797     return all(Ld(s[:i+1], s[i+1:]) == int(s[i]) for i in range(len(s)-1))
%o A367797 print([k for k in range(10**7) if ok(k)]) # _Michael S. Branicky_, Dec 01 2023
%Y A367797 Cf. A367638.
%K A367797 base,nonn
%O A367797 1,1
%A A367797 _Eric Angelini_ and _Giorgos Kalogeropoulos_, Nov 30 2023