login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A137059 Numbers k such that k and k^2 use only the digits 1, 4, 8 and 9. 0

%I #9 Apr 12 2024 09:51:27

%S 1,9,141,441,1191

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

%C Generated with DrScheme.

%C No more terms up to 10^27. - _Robert Israel_, Nov 23 2023

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

%e 1191^2 = 1418481.

%p Good:= {1,4,8,9}:

%p R:= 1,9:

%p G[1]:= select(t -> member(t^2 mod 10,Good), Good):

%p for d from 2 to 27 do

%p G[d]:= select(t -> member(floor((t^2 mod 10^d)/10^(d-1)),Good), map(t -> seq(10^(d-1)*i+t, i=Good), G[d-1]));

%p for t in G[d] do

%p if convert(convert(t^2,base,10),set) subset Good then R:= R,t fi

%p od

%p od:

%p R; # _Robert Israel_, Nov 23 2023

%K base,nonn,changed

%O 1,2

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

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 23 20:33 EDT 2024. Contains 371916 sequences. (Running on oeis4.)