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!)
A137064 Numbers k such that k and k^2 use only the digits 1, 6, 7 and 8. 0

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

%S 1,881,88776,7866881

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

%C Generated with DrScheme.

%C No additional terms through 10^10. - _Harvey P. Dale_, Apr 26 2015

%C No additional terms through 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 7866881^2 = 61887816668161.

%p Good:= {1,6,7,8}:

%p G[1]:= {1,6}: R:= 1;

%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 sort([R]); # _Robert Israel_, Nov 23 2023

%t With[{c={1,6,7,8}},Select[Flatten[Table[FromDigits/@Tuples[c,n],{n,7}]],SubsetQ[c,IntegerDigits[#^2]]&]] (* _Harvey P. Dale_, Apr 26 2015 *)

%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 24 06:34 EDT 2024. Contains 371920 sequences. (Running on oeis4.)