login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Squares containing only the digits 0, 4 or 8.
0

%I #12 Apr 19 2019 12:15:09

%S 0,4,400,484,40000,40804,48400,88804,4000000,4008004,4080400,4088484,

%T 4840000,4848804,8880400,400000000,400080004,400800400,400880484,

%U 408040000,408848400,484000000,484088004,484880400,840884004,888040000,40000000000,40000800004

%N Squares containing only the digits 0, 4 or 8.

%F a(n)=A202170(n)^2

%t Select[Range[0, 400000]^2, Complement[Union[IntegerDigits[#]], {0, 4, 8}] == {} &] (* _T. D. Noe_, Dec 21 2011 *)

%t Select[FromDigits/@Tuples[{0,4,8},11],IntegerQ[Sqrt[#]]&] (* _Harvey P. Dale_, Apr 19 2019 *)

%o (PARI) for(i=0,99999,setminus(Set(Vec(Str(i^2))),Vec("048")) | print1(i^2,","))

%Y Cf. A030098.

%K nonn,base

%O 1,2

%A _M. F. Hasler_, Dec 13 2011