login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A137113 Numbers k such that k and k^2 use only the digits 2, 5, 6 and 8. 0
5, 25, 2585, 828665, 25662585 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

COMMENTS

Generated with DrScheme.

No further terms < 2*10^22. - Robert Israel, Oct 04 2019

No further terms < 10^29. - David A. Corneth, Oct 04 2019

LINKS

Table of n, a(n) for n=1..5.

J. Wellons, Tables of Shared Digits [Wayback Machine link added by Felix Fröhlich, Oct 04 2019]

EXAMPLE

25662585^2 = 658568268882225.

MAPLE

Extend:= proc(x, d)

local i;

  op(select(t -> member(floor(t^2/10^(d)) mod 10, {2, 5, 6, 8}), [seq(i*10^d+x, i=[2, 5, 6, 8])]))

end proc:

R[0]:= [5, 6]:

for m from 1 to 10 do R[m]:= map(Extend, R[m-1], m) od:

[seq(op(select(t -> convert(convert(t^2, base, 10), set) subset {2, 5, 6, 8}, R[m])), m=0..10)]; # Robert Israel, Oct 04 2019

MATHEMATICA

With[{c={2, 5, 6, 8}}, Select[FromDigits/@Flatten[Table[Tuples[c, n], {n, 8}], 1], SubsetQ[ c, IntegerDigits[#^2]]&]] (* Harvey P. Dale, Jan 25 2021 *)

PROG

(MAGMA) [k:k in [1..10^6]| Set(Intseq(k)) join Set(Intseq(k^2)) subset {2, 5, 6, 8}]; // Marius A. Burtea, Oct 04 2019

(PARI) is(n) = my(v=[0, 1, 3, 4, 7, 9]); #setintersect(vecsort(digits(n), , 8), v)==0 && #setintersect(vecsort(digits(n^2), , 8), v)==0 \\ Felix Fröhlich, Oct 04 2019

CROSSREFS

Sequence in context: A328124 A033981 A099077 * A137115 A060063 A106295

Adjacent sequences:  A137110 A137111 A137112 * A137114 A137115 A137116

KEYWORD

nonn,base,more

AUTHOR

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

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified October 23 04:06 EDT 2021. Contains 348211 sequences. (Running on oeis4.)