|
|
A358705
|
|
Zeroless pandigital numbers whose square has each digit 1 to 9 twice.
|
|
0
|
|
|
345918672, 351987624, 359841267, 394675182, 429715863, 439516278, 487256193, 527394816, 527498163, 528714396, 572493816, 592681437, 729564183, 746318529, 749258163, 754932681, 759142683, 759823641, 762491835, 783942561, 784196235, 845691372, 891357624, 914863275, 915786423, 923165487, 928163754, 976825431
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
LINKS
|
|
|
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:
|
|
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
|
|
|
STATUS
|
approved
|
|
|
|