The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 Please make a donation to keep the OEIS running. We are now in our 56th year. In the past year we added 10000 new sequences and reached almost 9000 citations (which often say "discovered thanks to the OEIS"). Other ways to donate

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A171400 Minimal number of editing steps (delete, insert or substitute) to transform the binary representation of n into that of A007918(n), the least prime not less than n. 5
 1, 1, 0, 0, 1, 0, 1, 0, 2, 1, 1, 0, 1, 0, 3, 3, 1, 0, 1, 0, 2, 1, 1, 0, 2, 1, 2, 2, 1, 0, 1, 0, 2, 1, 2, 2, 1, 0, 3, 3, 1, 0, 1, 0, 2, 1, 1, 0, 2, 1, 2, 2, 1, 0, 2, 2, 2, 1, 1, 0, 1, 0, 5, 4, 2, 1, 1, 0, 2, 1, 1, 0, 1, 0, 2, 1, 2, 1, 1, 0, 2, 1, 1, 0, 2, 2, 3, 3, 1, 0, 4, 4, 4, 4, 5, 5, 1, 0, 2, 2, 1, 0, 1, 0, 2 (list; graph; refs; listen; history; text; internal format)
 OFFSET 0,9 COMMENTS Delete steps are not necessary; a(n) = 0 iff n is prime: a(A000040(n))=0; a(A171401(n)) = 1; A171402 gives smallest numbers m such that a(m)=n: a(A171402(n))=n. LINKS R. Zumkeller, Table of n, a(n) for n = 0..2500 Michael Gilleland, Levenshtein Distance Wikipedia, Levenshtein Distance FORMULA a(n) = BinaryLevenshteinDistance(n, A007918(n)). EXAMPLE n=14, A007918(14)=17: 14==1110->1100->1100->10001==17, 2 subst and 1 ins: a(14)=3; n=15, A007918(15)=17: 15==1111->1011->1001->10001==17, 2 subst and 1 ins: a(15)=3; n=16, A007918(16)=17: 16==10000->10001==17, 1 subst: a(16)=1, A171401(8)=16; n=17, A007918(17)=17: no editing step: a(17)=0; n=18, A007918(18)=19: 18==10010->10011==19, 1 subst: a(18)=1, A171401(9)=18. CROSSREFS Cf. A007088, A007920. Sequence in context: A204459 A035155 A090584 * A271592 A128409 A133699 Adjacent sequences:  A171397 A171398 A171399 * A171401 A171402 A171403 KEYWORD base,nonn AUTHOR Reinhard Zumkeller, Dec 08 2009 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.

Last modified November 30 06:11 EST 2020. Contains 338781 sequences. (Running on oeis4.)