%I #15 Apr 12 2024 09:51:27
%S 2,3,4943,499423,49993443,4999932923,499999999293429243923,
%T 499999999999293429243923
%N Numbers k such that k and k^2 use only the digits 2, 3, 4 and 9.
%C Generated with DrScheme.
%H J. Wellons, <a href="https://web.archive.org/web/20090206165028/http://jonathanwellons.com/shared-digits/">Tables of Shared Digits</a> [archived] [BROKEN LINK]
%e 4999932923^2 = 24999329234499323929.
%p g:= n -> convert(convert(n,base,10),set) subset {2,3,4,9}:
%p Res:= 2,3:
%p extend:= proc(n,d) local B; global Res;
%p B:= {seq(x*10^d+n,x=[2,3,4,9])};
%p Res:= Res, op(select(t -> g(t^2), B));
%p op(select(t -> g(t^2 mod 10^(d+1)), B))
%p end proc:
%p Agenda:= {2,3,4,9}:
%p for d from 1 to 25 do Agenda:= map(extend,Agenda,d) od:
%p sort([Res]); # _Robert Israel_, Oct 29 2018
%Y Cf. A136809.
%K base,nonn,changed
%O 1,1
%A Jonathan Wellons (wellons(AT)gmail.com), Jan 22 2008
%E a(7)-a(8) from _Andrew Howroyd_, Oct 24 2018
|