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”).

A238553
Numbers n such that the decimal expansions of both n and n^2 have 3 as the digit with the smallest value and 9 as the digit with the largest value.
6
5793, 5963, 6593, 6963, 7593, 8593, 9357, 9463, 9663, 9883, 9934, 9937, 9938, 57937, 58893, 58937, 58963, 59463, 59537, 59543, 59663, 59736, 59833, 59863, 59883, 65937, 66893, 68963, 69537, 69634, 69883, 73956, 73957, 79583, 79836, 79837, 79934, 83594, 85938
OFFSET
1,1
LINKS
EXAMPLE
5793 is in the sequence because its smallest digit is 3 and its largest digit is 9, and this is also true of 5793^2 = 33558849.
5833 is not in the sequence because 5833^2 = 34023889, which contains a 0 and a 2.
MATHEMATICA
fQ[n_] := Block[{c = DigitCount@ n}, And[Plus @@ Take[c, {1, 2}] == 0, Last@ c == 0, c[[3]] > 0, c[[9]] > 0]]; Select[Range@ 90000, 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))==9 && vecmax(digits(n^2))==9
KEYWORD
nonn,base
AUTHOR
Felix Fröhlich, Apr 27 2015
STATUS
approved