A054031 Numbers whose square contains exactly 3 distinct digits.
13, 14, 16, 17, 18, 19, 23, 24, 25, 27, 28, 29, 31, 34, 35, 39, 40, 41, 45, 46, 47, 50, 56, 58, 60, 62, 63, 65, 67, 68, 70, 75, 76, 77, 80, 81, 83, 85, 90, 91, 92, 94, 97, 101, 102, 107, 108, 110, 111, 119, 120, 121, 122, 129, 131, 141, 149, 150, 162, 165
Offset: 1
Links
- Giovanni Resta, Table of n, a(n) for n = 1..12299 (terms < 10^18, first 1000 terms from T. D. Noe)
- Michael Geißer, Theresa Körner, Sascha Kurz, and Anne Zahn, Squares with three digits, arXiv:2112.00444 [math.NT], 2021-2022.
- Carlos Rivera, Puzzle 313. Squares having only k distinct digits, The Prime Puzzles and Problems Connection.
Crossrefs
Programs
-
Maple
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;
-
Mathematica
t = {}; n = -1; While[Length[t] < 50, n++; If[Length[Union[IntegerDigits[n^2]]] == 3, AppendTo[t, n]]] (* T. D. Noe, Apr 26 2013 *) Select[Range[200],Length[Union[IntegerDigits[#^2]]]==3&] (* Harvey P. Dale, Aug 17 2014 *)
-
PARI
is(n)=#Set(digits(n^2))==3 \\ Charles R Greathouse IV, Feb 11 2017
Formula
A235718(n) = a(n)^2. - Giovanni Resta, Apr 28 2017