login
A257763
Zeroless numbers n such that n and n^2 have the same set of decimal digits.
5
1, 4762, 4832, 12385, 14829, 26394, 34196, 36215, 49827, 68474, 72576, 74528, 79286, 79836, 94583, 94867, 96123, 98376, 123385, 123546, 124235, 124365, 124579, 124589, 125476, 125478, 126969, 129685, 135438, 139256, 139261, 139756, 149382, 152385, 156242
OFFSET
1,2
LINKS
FORMULA
{A029793} intersect {A052382}.
EXAMPLE
4762 is in the sequence because it is zeroless and 4762^2 = 22676644 has the same set of decimal digits as 4762: {2,4,6,7}.
MAPLE
a:= proc(n) option remember; local k, s;
for k from 1+`if`(n=1, 0, a(n-1)) do
s:= {convert(k, base, 10)[]};
if not 0 in s and s={convert(k^2, base, 10)[]}
then return k fi
od
end:
seq(a(n), n=1..10);
MATHEMATICA
sameQ[n_]:=Union[IntegerDigits[n]]==Union[IntegerDigits[n^2]]; Select[Range@156242, And[FreeQ[IntegerDigits[#], 0], sameQ[#]]&] (* Ivan N. Ianakiev, May 08 2015 *)
PROG
(Python)
A257763_list = [n for n in range(1, 10**6) if not '0' in str(n) and set(str(n)) == set(str(n**2))] # Chai Wah Wu, May 31 2015
(PARI) isok(n) = vecmin(d=digits(n)) && Set(d) == Set(digits(n^2)); \\ Michel Marcus, May 31 2015
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Alois P. Heinz, May 07 2015
STATUS
approved