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.
%I A091093 #15 Feb 16 2025 08:32:52 %S A091093 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, %T A091093 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, %U A091093 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 %N A091093 In ternary representation: minimal number of editing steps (delete, insert or substitute) to transform n into n^2. %H A091093 Robert Israel, <a href="/A091093/b091093.txt">Table of n, a(n) for n = 0..10000</a> %H A091093 Michael Gilleland, <a href="http://www.merriampark.com/ld.htm">Levenshtein Distance</a> [It has been suggested that this algorithm gives incorrect results sometimes. - _N. J. A. Sloane_] %H A091093 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/SquareNumber.html">Square Number</a> %H A091093 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/Ternary.html">Ternary</a> %F A091093 a(n) = LevenshteinDistance(A007089(n), A001738(n)). %e A091093 a(12)=2: 12->'110', insert a 2 between the 1's and insert a 0 at the end: '12100'->144=12^2. %p A091093 A091093:= proc(x) local L1, L2; %p A091093 L1:= convert(map(`+`,ListTools:-Reverse(convert(x,base,3)),48),bytes); %p A091093 L2:= convert(map(`+`,ListTools:-Reverse(convert(x^2,base,3)),48),bytes); %p A091093 StringTools:-Levenshtein(L1,L2) %p A091093 end proc: %p A091093 seq(A091093(i),i=0..1000); # _Robert Israel_, May 06 2014 %Y A091093 Cf. A091092, A091091, A081604, A000290. %K A091093 nonn,base %O A091093 0,3 %A A091093 _Reinhard Zumkeller_, Dec 18 2003