login
A254072
Numbers n such that the decimal expansions of both n and n^2 have 4 as the digit with the smallest value and 9 as the digit with the largest value.
3
974, 9476, 9874, 69684, 94588, 94657, 94788, 94867, 97457, 99476, 99784, 669684, 677974, 697764, 699684, 699764, 699784, 746957, 869457, 945857, 946878, 946888, 947457, 947574, 947886, 947887, 947976, 948678, 974457, 974474, 984878, 998784, 6669684, 6696684
OFFSET
1,1
MATHEMATICA
fQ[n_] := Block[{c = DigitCount@ n}, And[Plus @@ Take[c, {1, 3}] == 0, Last@ c == 0, c[[4]] > 0, c[[9]] > 0]]; Select[Range@ 1000000, fQ@ # && fQ[#^2] &] (* Michael De Vlieger, May 05 2015 *)
PROG
(PARI) is(n) = vecmin(digits(n))==4 && vecmin(digits(n^2))==4 && vecmax(digits(n))==9 && vecmax(digits(n^2))==9
KEYWORD
nonn,base
AUTHOR
Felix Fröhlich, May 03 2015
STATUS
approved