%I #11 Apr 12 2024 09:51:26
%S 0,1,4,8,10,40,41,80,100,104,108,400,401,408,410,641,800,801,804,1000,
%T 1004,1008,1040,1080,4000,4001,4008,4010,4080,4100,6410,6441,8000,
%U 8001,8004,8010,8040,10000,10004,10008,10040,10080,10400,10401,10800,10801,40000,40001,40008,40010,40080,40100,40604,40800,41000,64100,64410,66441,80000,80001
%N Numbers k such that k and k^2 use only the digits 0, 1, 4, 6 and 8.
%C Generated with DrScheme.
%H Jonathan Wellons, <a href="/A136861/b136861.txt">Table of n, a(n) for n = 1..1026</a>
%H J. Wellons, <a href="https://web.archive.org/web/20090206165028/http://jonathanwellons.com/shared-digits/">Tables of Shared Digits</a> [archived]
%e 68418648641^2 = 4681111481860611146881.
%t id2Q[n_]:=Module[{idn2=IntegerDigits[n^2],digs={0,1,4,6,8}}, And@@Table[ MemberQ[digs,idn2[[i]]],{i,Length[idn2]}]]; Select[Union[Flatten[ Table[FromDigits/@Tuples[{0,1,4,6,8},n],{n,5}]]],id2Q] (* _Harvey P. Dale_, Aug 19 2012 *)
%K base,nonn
%O 1,3
%A Jonathan Wellons (wellons(AT)gmail.com), Jan 22 2008
|