login
A257498
Numbers n such that the decimal expansions of both n and n^2 have 3 as the digit with the smallest value and 8 as the digit with the largest value.
7
7378, 66834, 67438, 67738, 73874, 86356, 577378, 577438, 586374, 658388, 666834, 667438, 676438, 683874, 683876, 684438, 688374, 738474, 738538, 743878, 744538, 744738, 747378, 747438, 763844, 764438, 765738, 766384, 863388, 863474, 873874, 874378, 875434
OFFSET
1,1
MATHEMATICA
fQ[n_] := Block[{c = DigitCount@ n}, And[Plus @@ Take[c, {1, 2}] == 0, Plus @@ Take[c, {9, 10}] == 0, c[[3]] > 0, c[[8]] > 0]]; Select[Range@ 1000000, 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))==8 && vecmax(digits(n^2))==8
KEYWORD
nonn,base
AUTHOR
Felix Fröhlich, Apr 27 2015
STATUS
approved