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

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A081732 Number of numbers that differ from n in ternary representation by exactly one edit-operation: deletion, insertion, or substitution. 0
4, 6, 6, 11, 10, 11, 11, 11, 10, 14, 15, 15, 15, 14, 15, 16, 16, 15, 14, 15, 15, 16, 15, 16, 15, 15, 14, 18, 19, 19, 20, 19, 20, 20, 20, 19, 19, 20, 20, 19, 18, 19, 20, 20, 19, 20, 21, 21, 21, 20, 21, 20, 20, 19, 18, 19, 19, 20, 19, 20, 20, 20, 19, 20, 21, 21, 20, 19, 20, 21 (list; graph; refs; listen; history; internal format)
OFFSET

0,1

COMMENTS

a(n) = #{j: LD-3(n,j)=1}, where LD-3 is the Levenshtein distance on ternary strings.

LINKS

Michael Gilleland, Levenshtein Distance. [It has been suggested that this algorithm gives incorrect results sometimes. - N. J. A. Sloane (njas(AT)research.att.com)]

EXAMPLE

n=12: ternary representation of numbers at Levenshtein distance 1 from 12='110':

{10, 11, 100, 111, 112, 120, 210, 1010, 1100, 1101,

1102, 1110, 1120, 1210, 2110}, therefore a(12)=15.

n=42: ternary representation of numbers at Levenshtein distance 1 from 42='1120':

{110, 112, 120, 1020, 1100, 1110, 1121, 1122, 1220,

2120, 10120, 11020, 11120, 11200, 11201, 11202, 11210, 11220, 12120, 21120},

therefore a(42)=20.

CROSSREFS

Cf. A080950, A080910, A007089.

Sequence in context: A075653 A075656 A193814 * A079033 A077038 A053320

Adjacent sequences:  A081729 A081730 A081731 * A081733 A081734 A081735

KEYWORD

nonn,base

AUTHOR

Reinhard Zumkeller (reinhard.zumkeller(AT)gmail.com), Apr 06 2003

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
Recent Additions | More pages | Superseeker | Maintained by The OEIS Foundation Inc.

Content is available under The OEIS End-User License Agreement .

Last modified February 17 00:09 EST 2012. Contains 205978 sequences.