cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A030098 Squares whose digits are all even.

This page as a plain text file.
%I A030098 #32 Jan 24 2023 14:25:49
%S A030098 0,4,64,400,484,4624,6084,6400,8464,26244,28224,40000,40804,48400,
%T A030098 68644,88804,228484,242064,248004,446224,462400,608400,640000,806404,
%U A030098 824464,846400,868624,2022084,2226064,2244004,2624400,2822400,2862864,4000000,4008004,4080400
%N A030098 Squares whose digits are all even.
%C A030098 On the other hand, the only squares whose digits are all odd are 1 and 9, because the tens digit of all odd squares >= 25 (A016754) is always even. - _Bernard Schott_, Jan 24 2023
%H A030098 Michael S. Branicky, <a href="/A030098/b030098.txt">Table of n, a(n) for n = 1..10000</a> (terms 1..1000 from T. D. Noe)
%F A030098 a(n) = A030097(n)^2. - _Michel Marcus_, Apr 03 2014
%t A030098 t = {}; n = -1; While[Length[t] < 1000, n++; If[Intersection[IntegerDigits[n^2], {1, 3, 5, 7, 9}] == {}, AppendTo[t, n^2]]] (* _T. D. Noe_, Apr 03 2014 *)
%t A030098 Select[Range[0,3000]^2,AllTrue[IntegerDigits[#],EvenQ]&] (* The program uses the AllTrue function from Mathematica version 10 *) (* _Harvey P. Dale_, Feb 19 2016 *)
%o A030098 (Python)
%o A030098 from math import isqrt
%o A030098 def ok(sq): return all(d in "02468" for d in str(sq))
%o A030098 def aupto(limit):
%o A030098   sqs = (i*i for i in range(0, isqrt(limit)+1, 2))
%o A030098   return list(filter(ok, sqs))
%o A030098 print(aupto(4080400)) # _Michael S. Branicky_, May 20 2021
%Y A030098 Subsequence of A075787.
%Y A030098 Cf. A016754, A030097.
%K A030098 nonn,base
%O A030098 1,2
%A A030098 _Patrick De Geest_