

A137113


Numbers k such that k and k^2 use only the digits 2, 5, 6 and 8.


0




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[m1], 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


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



