OFFSET
0,3
LINKS
Robert Israel, Table of n, a(n) for n = 0..10000
Michael Gilleland, Levenshtein Distance [It has been suggested that this algorithm gives incorrect results sometimes. - N. J. A. Sloane]
Eric Weisstein's World of Mathematics, Square Number
Eric Weisstein's World of Mathematics, Ternary
EXAMPLE
a(12)=2: 12->'110', insert a 2 between the 1's and insert a 0 at the end: '12100'->144=12^2.
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
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Reinhard Zumkeller, Dec 18 2003
STATUS
approved