login
A254071
Numbers n such that the decimal expansions of both n and n^2 have 4 as the digit with the smallest value and 8 as the digit with the largest value.
5
684, 6684, 8874, 66684, 68474, 74758, 76478, 86478, 666684, 668474, 675684, 744758, 766458, 6666684, 6668474, 6675684, 6748678, 6845784, 7586478, 8686574, 8875684, 66666684, 66756684, 74744758, 74758576, 75858874, 75867574, 76464878, 86878458, 87546878
OFFSET
1,1
MATHEMATICA
fQ[n_] := Block[{c = DigitCount@ n}, And[Plus @@ Take[c, {1, 3}] == 0, Plus @@ Take[c, {9, 10}] == 0, c[[4]] > 0, c[[8]] > 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))==8 && vecmax(digits(n^2))==8
KEYWORD
nonn,base
AUTHOR
Felix Fröhlich, May 03 2015
STATUS
approved