login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Numbers n such that the decimal expansions of both n and n^2 have 2 as smallest digit and 8 as largest digit.
10

%I #18 May 02 2015 10:20:14

%S 278,528,582,826,2385,2585,2868,2872,2875,2878,2885,4782,4832,4872,

%T 5278,5328,6872,7238,7258,7268,7582,8232,8266,8275,8278,8284,8522,

%U 8524,8528,8628,8732,8822,23385,23628,23782,23826,25582,25668,25785,25856,26238,26878

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

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

%t fQ[n_] := Block[{d = DigitCount@ n}, Plus @@ Prepend[Take[d, -2], First@ d] == 0 && d[[2]] > 0 && d[[8]] > 0]; Select[Range@ 27000, fQ@ # && fQ[#^2] &] (* _Michael De Vlieger_, Apr 27 2015 *)

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

%Y Cf. A256630, A256631, A256633, A256634, A256708, A256709, A256889, A257123, A257197, A257210, A257211, A256601, A257310.

%K nonn,base

%O 1,1

%A _Felix Fröhlich_, Apr 25 2015