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.
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
Examples
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.
Links
- Felix Fröhlich, Table of n, a(n) for n = 1..10000
Crossrefs
Programs
-
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 *)
-
PARI
is(n) = vecmin(digits(n))==3 && vecmin(digits(n^2))==3 && vecmax(digits(n))==9 && vecmax(digits(n^2))==9