A137117 Numbers k such that k and k^2 use only the digits 2, 5, 7 and 9.
5, 27, 77, 527, 7227, 27797977
Offset: 1
Examples
27797977^2 = 772727525292529.
Links
- Jonathan Wellons, Tables of Shared Digits [archived].
Programs
-
Mathematica
With[{c={2,5,7,9}},Table[Select[FromDigits/@Tuples[c,n],SubsetQ[c, IntegerDigits[ #^2]]&],{n,8}]]//Flatten (* Harvey P. Dale, Oct 02 2017 *)
-
Python
# uses auptod in A137110 print(auptod(16, only="2579")) # Michael S. Branicky, May 27 2021
Comments