OFFSET
1,1
EXAMPLE
345918672 is a term since its square 119659727638243584 contains all digits 1..9 twice each.
MAPLE
R:= NULL:
for t in combinat:-permute([$1..9]) do
x:= add(t[i]*10^(i-1), i=1..9);
if sort(convert(x^2, base, 10)) = [seq(i$2, i=1..9)] then
R:= R, x
fi
od:
sort([R]); # Robert Israel, Nov 27 2022
PROG
(Python)
from itertools import permutations as per
a=[]
for n in [int(''.join(d)) for d in per('123456789', 9)]:
if all(str(n**2).count(d) ==2 for d in '123456789'):
a.append(n)
print(a)
CROSSREFS
KEYWORD
nonn,base,fini,full
AUTHOR
Zhining Yang, Nov 27 2022
STATUS
approved