login
Numbers n such that the decimal expansions of both n and n^2 have 0 as smallest digit and 7 as largest digit.
23

%I #11 Apr 17 2015 15:32:52

%S 740,760,1071,1740,2074,2705,2710,2740,2750,2760,3705,3710,3760,4071,

%T 4705,4740,4760,5071,5705,5760,6740,7074,7240,7260,7400,7550,7560,

%U 7600,7601,7760,10076,10174,10274,10275,10371,10375,10376,10571,10710,10724,10726,10740

%N Numbers n such that the decimal expansions of both n and n^2 have 0 as smallest digit and 7 as largest digit.

%H Felix Fröhlich, <a href="/A256634/b256634.txt">Table of n, a(n) for n = 1..10000</a>

%t fQ[n_] := Block[{c = DigitCount@ n}, And[Plus @@ Take[c, {8, 9}] == 0, c[[7]] > 0, c[[10]] > 0]]; Select[Range@ 10800, fQ@ # && fQ[#^2] &] (* _Michael De Vlieger_, Apr 12 2015 *)

%o (PARI) is(n) = vecmin(digits(n))==0 && vecmin(digits(n^2))==0 && vecmax(digits(n))==7 && vecmax(digits(n^2))==7

%Y Cf. A136813, A256630, A256631, A256633, A256708, A256709.

%K nonn,base

%O 1,1

%A _Felix Fröhlich_, Apr 05 2015