A257086 Numbers n such that the decimal expansions of both n and n^2 only use the digits 0..5.
0, 1, 2, 5, 10, 11, 12, 15, 20, 21, 32, 35, 45, 50, 55, 100, 101, 102, 105, 110, 111, 112, 115, 120, 145, 150, 152, 155, 200, 201, 205, 210, 211, 235, 320, 321, 332, 335, 350, 351, 450, 451, 452, 500, 501, 502, 505, 550, 1000, 1001, 1002, 1005, 1010, 1011, 1012, 1015, 1020, 1021, 1050, 1055, 1100
Offset: 1
Examples
115 is in the list because 115 and 115^2 = 13225 do not use the digits 6, 7, 8, or 9. 121 is not in the list because 121^2 = 14641 uses the digit 6. 149 is not in the list because it uses the digit 9 (even though 149^2 = 22201 would be okay).
Links
- Danny Rorabaugh, Table of n, a(n) for n = 1..5000
Crossrefs
Programs
-
Mathematica
Select[Range@ 1100, Total@ Take[DigitCount[#], {6, 9}] == 0 && Total@ Take[DigitCount[#^2], {6, 9}] == 0 &] (* Michael De Vlieger, Apr 17 2015 *)