login
Numbers k such that k and k^2 use only the digits 2, 4, 7 and 8.
0

%I #12 May 10 2024 11:28:54

%S 2,22,28,88,278,472,478,2878

%N Numbers k such that k and k^2 use only the digits 2, 4, 7 and 8.

%C Generated with DrScheme.

%C No further terms up to 20 billion. - _Harvey P. Dale_, Dec 15 2011

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

%e 2878^2 = 8282884.

%t oksQ[n_]:=Module[{idn2=Union[IntegerDigits[n^2]]},And@@Table[MemberQ[{2,4,7,8}, idn2[[i]]],{i,Length[idn2]}]]; Select[FromDigits/@Flatten[ Table[ Tuples[ {2,4,7,8},n],{n,9}],1],oksQ] (* _Harvey P. Dale_, Dec 15 2011 *)

%K base,nonn,more

%O 1,1

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