OFFSET
0,1
COMMENTS
For positive n, the string length of a(n+1) is always the 1 + the string length of a(n). This sequence is infinite.
LINKS
Michael Gilleland, Levenshtein Distance, in Three Flavors. [It has been suggested that this algorithm gives incorrect results sometimes. - N. J. A. Sloane]
V. I. Levenshtein, Efficient reconstruction of sequences from their subsequences or supersequences, J. Combin. Theory Ser. A 93 (2001), no. 2, 310-332.
EXAMPLE
a(0) = 4 = 2^2.
a(1) = 6 because we transform a(0) = 4 to 6 = 2 * 3 (a semiprime) with one substitution.
a(2) = 10 because we transform a(1) = 6 to 10 = 2 * 5 with one substitution and one insertion.
a(3) = 221 because we transform a(2) = 10 to the least semiprime 221 = 13 * 17 with 1 substitution plus two insertion.
a(4) = 1003 because we transform a(3) = 221 to the least semiprime 1003 = 17 * 59 with 3 substitutions plus one insertion and any smaller semiprime can be transformed from 221 in fewer than 4 steps.
a(20) = 10000000000000000001 = 11 * 909090909090909091, which is the least semiprime of Levenshtein distance 20 from a(19) = 2222222222222222222 from which decimal string we transform to a(20) with 19 substitutions and one insertion.
CROSSREFS
KEYWORD
easy,nonn,base
AUTHOR
Jonathan Vos Post, Aug 25 2005
STATUS
approved