%I #11 May 10 2024 09:26:16
%S 1,9,11,91,911
%N Numbers k such that k and k^2 use only the digits 1, 2, 8 and 9.
%C Generated with DrScheme.
%C No additional terms through 10^10. - _Harvey P. Dale_, Jul 04 2012
%H Jonathan Wellons, <a href="https://web.archive.org/web/20090206165028/http://jonathanwellons.com/shared-digits/">Tables of Shared Digits</a> [archived]
%e 911^2 = 829921.
%t okQ[n_]:=Module[{u=Union[IntegerDigits[n^2]]},And@@Table[MemberQ[ {1,2,8,9}, u[[i]]],{i,Length[u]}]]; Flatten[Table[ Select[FromDigits/@ Tuples[{1,2,8,9},x],okQ],{x,10}]] (* _Harvey P. Dale_, Jul 04 2012 *)
%K base,nonn,more
%O 1,2
%A Jonathan Wellons (wellons(AT)gmail.com), Jan 22 2008