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.

Showing 1-2 of 2 results.

A091092 In binary representation: minimal number of editing steps (delete, insert or substitute) to transform n into n^2.

Original entry on oeis.org

0, 0, 1, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 6, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 5, 5, 5, 6, 6, 6, 7, 7, 6, 6, 6, 6, 6, 6, 6, 7, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 6, 6, 7, 7, 6, 6, 6, 6, 6, 7, 7, 7, 7, 6, 7, 8, 8, 7, 8, 8, 7, 7, 7, 7, 7, 8
Offset: 0

Views

Author

Reinhard Zumkeller, Dec 18 2003

Keywords

Comments

a(n) = A152487(A000290(n),n). - Reinhard Zumkeller, Dec 06 2008

Examples

			a(7)=3: 7->'111', 3 x insert a 0 between the last two 1's:
'110001'->49=7^2.
		

Crossrefs

Formula

a(n) = LevenshteinDistance(A007088(n), A001737(n)).

A091093 In ternary representation: minimal number of editing steps (delete, insert or substitute) to transform n into n^2.

Original entry on oeis.org

0, 0, 2, 1, 1, 2, 3, 2, 3, 2, 2, 4, 2, 4, 3, 3, 4, 4, 4, 4, 5, 3, 4, 3, 4, 3, 4, 3, 3, 4, 3, 3, 3, 5, 3, 5, 3, 3, 5, 5, 5, 6, 4, 3, 4, 4, 4, 5, 5, 4, 4, 5, 5, 5, 5, 5, 6, 5, 5, 5, 6, 4, 5, 4, 4, 5, 5, 4, 5, 4, 5, 5, 5, 4, 6, 4, 5, 4, 5, 4, 5, 4, 4, 5, 4, 4, 4, 5, 5, 5, 4, 4, 6, 4, 5, 4, 4, 5, 5, 5, 5, 6
Offset: 0

Views

Author

Reinhard Zumkeller, Dec 18 2003

Keywords

Examples

			a(12)=2: 12->'110', insert a 2 between the 1's and insert a 0 at the end: '12100'->144=12^2.
		

Crossrefs

Programs

  • Maple
    A091093:= proc(x) local L1, L2;
       L1:= convert(map(`+`,ListTools:-Reverse(convert(x,base,3)),48),bytes);
       L2:= convert(map(`+`,ListTools:-Reverse(convert(x^2,base,3)),48),bytes);
       StringTools:-Levenshtein(L1,L2)
    end proc:
    seq(A091093(i),i=0..1000); # Robert Israel, May 06 2014

Formula

a(n) = LevenshteinDistance(A007089(n), A001738(n)).
Showing 1-2 of 2 results.