A202170 Numbers k such that k^2 has only digits 0, 4 and 8.
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
Links
- Robert Israel, Table of n, a(n) for n = 1..204
Programs
-
Magma
[ n: n in [0..10^6 by 2] | Set(Intseq(n^2)) subset [0,4,8] ]; // Bruno Berselli, Dec 19 2011
-
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 *)
-
PARI
is_A202170(n)=!setminus(Set(Vec(Str(n^2))),Vec("048"))
Extensions
More terms from Robert Israel, Jul 17 2018
Comments