OFFSET
1,1
LINKS
Felix Fröhlich, Table of n, a(n) for n = 1..10000
MATHEMATICA
fQ[n_] := Block[{d = DigitCount@ n}, Plus @@ Join[First@ d, Last@ d] == 0 && d[[2]] > 0 && d[[9]] > 0]; Select[Range@ 10000, fQ@ # && fQ[#^2] &] (* Michael De Vlieger, Apr 27 2015 *)
s2l9Q[n_]:=Max[IntegerDigits[n]]==9&&Min[IntegerDigits[n]]==2; Select[ Range[ 10000], AllTrue[{#, #^2}, s2l9Q]&] (* Harvey P. Dale, Dec 06 2018 *)
PROG
(PARI) is(n) = vecmin(digits(n))==2 && vecmin(digits(n^2))==2 && vecmax(digits(n))==9 && vecmax(digits(n^2))==9
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Felix Fröhlich, Apr 26 2015
STATUS
approved