login
A202170
Numbers n such that n^2 has only digits 0, 4 and 8.
2
0, 2, 20, 22, 200, 202, 220, 298, 2000, 2002, 2020, 2022, 2200, 2202, 2980, 20000, 20002, 20020, 20022, 20200, 20220, 22000, 22002, 22020, 28998, 29800, 200000, 200002, 200020, 200022, 200200, 200202, 200220, 202000, 202002, 202200, 220000, 220002, 220020, 220200, 289980, 298000, 632522, 2000000
OFFSET
1,2
COMMENTS
n = 2*m where m^2 has only digits 0, 1 and 2. - Robert Israel, Jul 17 2018
LINKS
MAPLE
Res:= NULL:
for x from 0 to 3^12 do
L:= convert(x, base, 3);
y:= add(L[i]*10^(i-1), i=1..nops(L));
if issqr(y) then
Res:= Res, 2*sqrt(y)
fi
od:
Res; # Robert Israel, Jul 17 2018
MATHEMATICA
Select[Sqrt[FromDigits[#]]&/@Tuples[{0, 4, 8}, 13], IntegerQ] (* Harvey P. Dale, Sep 08 2024 *)
PROG
(PARI) is_A202170(n)=!setminus(Set(Vec(Str(n^2))), Vec("048"))
(Magma) [ n: n in [0..10^6 by 2] | Set(Intseq(n^2)) subset [0, 4, 8] ]; // Bruno Berselli, Dec 19 2011
CROSSREFS
Includes 2*A136808.
Sequence in context: A359611 A136909 A169965 * A136908 A196748 A144674
KEYWORD
nonn,base
AUTHOR
M. F. Hasler, Dec 13 2011
EXTENSIONS
More terms from Robert Israel, Jul 17 2018
STATUS
approved