login
A137100
Numbers k such that k and k^2 use only the digits 2, 4, 6 and 7.
0
2, 26, 474, 4762
OFFSET
1,1
COMMENTS
Generated with DrScheme.
No additional terms through 7777777777. - Harvey P. Dale, Dec 08 2015
No additional terms to 10^26. - Robert Israel, Nov 24 2023
LINKS
EXAMPLE
4762^2 = 22676644.
MAPLE
Good:= {2, 4, 6, 7}:
R:= 2:
G[1]:= select(t -> member(t^2 mod 10, Good), Good):
for d from 2 to 26 do
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]));
for t in G[d] do
if convert(convert(t^2, base, 10), set) subset Good then R:= R, t fi
od
od:
R; # Robert Israel, Nov 24 2023
MATHEMATICA
With[{c={2, 4, 6, 7}}, Select[Flatten[Table[FromDigits/@Tuples[c, n], {n, 5}]], SubsetQ[c, IntegerDigits[#^2]]&]] (* Harvey P. Dale, Dec 08 2015 *)
CROSSREFS
Sequence in context: A245999 A355725 A285026 * A228411 A364827 A371700
KEYWORD
base,nonn,more
AUTHOR
Jonathan Wellons (wellons(AT)gmail.com), Jan 22 2008
STATUS
approved