login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

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

%I #15 Sep 09 2017 22:24:27

%S 974,9476,9874,69684,94588,94657,94788,94867,97457,99476,99784,669684,

%T 677974,697764,699684,699764,699784,746957,869457,945857,946878,

%U 946888,947457,947574,947886,947887,947976,948678,974457,974474,984878,998784,6669684,6696684

%N 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.

%H Chai Wah Wu, <a href="/A254072/b254072.txt">Table of n, a(n) for n = 1..10000</a>

%t 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 *)

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

%Y Cf. A256630, A256631, A256633, A256634, A256708, A256709, A256889, A257197, A257210, A257211, A256601, A257310, A249915, A257123, A257368, A257485, A257486, A257498, A238553, A257534, A254071.

%K nonn,base

%O 1,1

%A _Felix Fröhlich_, May 03 2015