login
Numbers k such that k and k^2 use only the digits 0, 1, 6, 8 and 9.
1

%I #9 Apr 12 2024 09:51:26

%S 0,1,9,10,90,99,100,109,900,901,990,999,1000,1009,1090,9000,9001,9010,

%T 9900,9990,9999,10000,10009,10090,10099,10801,10900,81619,90000,90001,

%U 90010,90100,99000,99001,99900,99990,99999,100000,100009,100090,100099,100900,100901,100990,108010,109000,816190,900000,900001,900010,900100,901000,990000

%N Numbers k such that k and k^2 use only the digits 0, 1, 6, 8 and 9.

%C Generated with DrScheme.

%H Jonathan Wellons, <a href="/A136879/b136879.txt">Table of n, a(n) for n = 1..1291</a>

%H J. Wellons, <a href="https://web.archive.org/web/20090206165028/http://jonathanwellons.com/shared-digits/">Tables of Shared Digits</a> [archived]

%e 90106101906619^2 = 8119109600806008186996011161.

%t Module[{nn=6,c={0,1,6,8,9}},Select[FromDigits/@Tuples[c,nn],SubsetQ[ c,IntegerDigits[ #^2]]&]] (* _Harvey P. Dale_, Nov 30 2022 *)

%K base,nonn

%O 1,3

%A Jonathan Wellons (wellons(AT)gmail.com), Jan 22 2008