OFFSET
1,1
LINKS
Felix Fröhlich, Table of n, a(n) for n = 1..10000
EXAMPLE
5793 is in the sequence because its smallest digit is 3 and its largest digit is 9, and this is also true of 5793^2 = 33558849.
5833 is not in the sequence because 5833^2 = 34023889, which contains a 0 and a 2.
MATHEMATICA
fQ[n_] := Block[{c = DigitCount@ n}, And[Plus @@ Take[c, {1, 2}] == 0, Last@ c == 0, c[[3]] > 0, c[[9]] > 0]]; Select[Range@ 90000, fQ@ # && fQ[#^2] &] (* Michael De Vlieger, May 05 2015 *)
PROG
(PARI) is(n) = vecmin(digits(n))==3 && vecmin(digits(n^2))==3 && vecmax(digits(n))==9 && vecmax(digits(n^2))==9
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Felix Fröhlich, Apr 27 2015
STATUS
approved