Most square numbers have at least 1 different square number with which their Levenshtein distance is exactly 1. For a given square \$x\$, each square that meets this condition is called a Levenshtein neighbour of \$x\$. For example, \$36\$ is a Levenshtein neighbour of \$16\$, as only 1 edit (\$1 \to 3\$) is required. However, \$64\$ is not a Levenshtein neighbour of \$16\$, as it requires a minimum of 2 edits. Numbers that have leading 0s (\$2025 \to 025\$) are not Levenshtein neighbours.
Your task is to take a square number as input and to output, in any reasonable format, the complete list of it's Levenshtein neighbours. You may include repeat neighbours in the list, if you wish, but you may not include the original input, as it isn't a Levenshtein neighbour of itself.
Any reasonable format should include some sort of separator between the outputs, such as ,
or a newline, and can output characters with the corresponding Unicode value (i.e. brainfuck) rather than the numbers themselves. The order of the output doesn't matter.
This input will always be a square number, greater than \$0\$. Your program should have no theoretical limit, but if it fails for large numbers for practical reasons (e.g. beyond 32-bit numbers), that's completely fine.
If the input does not have any Levenshtein neighbours, the output must clearly reflect this, such as outputting nothing, an empty array/string, a negative integer, \$0\$, etc.
This is code-golf, so the shortest code in bytes wins.
Test cases
These are the results for the squares of \$1\$ through to \$20\$:
1: 4, 9, 16, 81
4: 1, 9, 49, 64
9: 1, 4, 49
16: 1, 36, 169, 196
25: 225, 256, 625
36: 16, 361
49: 4, 9
64: 4
81: 1, 841
100: 400, 900, 1600, 8100
121: 1521
144: 1444
169: 16, 1369
196: 16, 1296, 1936
225: 25, 625, 1225, 2025, 4225, 7225
256: 25
289: 2809
324: 3249
361: 36, 961
400: 100, 900, 4900, 6400
In addition, 1024
does not have any neighbours, so is a good test case.
2025
are. \$\endgroup\$ – Neil Aug 17 '19 at 23:2132 * 32 = 1024
has no square Levenshtein neighbours. \$\endgroup\$ – xnor Aug 17 '19 at 23:291024
does not have any Levenshtein neighbours, I'll edit that example in \$\endgroup\$ – caird coinheringaahing Aug 17 '19 at 23:38