login
Numbers k such that k and k^2 use only the digits 0, 1, 5, 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,10900,90000,90001,90010,90100,

%U 99000,99001,99900,99990,99999,100000,100009,100090,100099,100900,100901,100990,109000,900000,900001,900010,900100,901000,990000,990001,990010,995901,999000

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

%C Generated with DrScheme.

%H Jonathan Wellons, <a href="/A136874/b136874.txt">Table of n, a(n) for n = 1..1145</a>

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

%e 9899585850509^2 = 98001800011598000895559081.

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

%K base,nonn

%O 1,3

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