%I #35 Jan 13 2024 13:07:33
%S 13,14,16,17,18,19,23,24,25,27,28,29,31,34,35,39,40,41,45,46,47,50,56,
%T 58,60,62,63,65,67,68,70,75,76,77,80,81,83,85,90,91,92,94,97,101,102,
%U 107,108,110,111,119,120,121,122,129,131,141,149,150,162,165
%N Numbers whose square contains exactly 3 distinct digits.
%H Giovanni Resta, <a href="/A054031/b054031.txt">Table of n, a(n) for n = 1..12299</a> (terms < 10^18, first 1000 terms from T. D. Noe)
%H Michael Geißer, Theresa Körner, Sascha Kurz, and Anne Zahn, <a href="https://arxiv.org/abs/2112.00444">Squares with three digits</a>, arXiv:2112.00444 [math.NT], 2021-2022.
%H Carlos Rivera, <a href="http://www.primepuzzles.net/puzzles/puzz_313.htm">Puzzle 313. Squares having only k distinct digits</a>, The Prime Puzzles and Problems Connection.
%F A235718(n) = a(n)^2. - _Giovanni Resta_, Apr 28 2017
%p f := []; for i from 0 to 200 do if nops({op(convert(i^2,base,10))})=3 then f := [op(f),i] fi; od; f;
%t t = {}; n = -1; While[Length[t] < 50, n++; If[Length[Union[IntegerDigits[n^2]]] == 3, AppendTo[t, n]]] (* _T. D. Noe_, Apr 26 2013 *)
%t Select[Range[200],Length[Union[IntegerDigits[#^2]]]==3&] (* _Harvey P. Dale_, Aug 17 2014 *)
%o (PARI) is(n)=#Set(digits(n^2))==3 \\ _Charles R Greathouse IV_, Feb 11 2017
%Y Cf. A235718, A016069, A054032, A054033, A054034, A054035, A054036, A054037, A054038, A054039.
%K nonn,base
%O 1,1
%A _Asher Auel_, Feb 29 2000