login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A343724 a(n) is the smallest n-digit square with all digits even. 3

%I #29 Jun 02 2021 10:15:19

%S 0,64,400,4624,26244,228484,2022084,20268004,202208400,2006860804,

%T 20220840000,200084446864,2002004266084,20000286620224,

%U 200080402620484,2000028662022400,20000086482842244,200002866202240000,2000008648284224400,20000246442286866064

%N a(n) is the smallest n-digit square with all digits even.

%C From _Robert G. Wilson v_, May 20 2021: (Start)

%C The square root of any term is == {0, 2, 8} (mod 10).

%C Other than 1 and 9, there are no squares which contain only odd digits.

%C (End)

%H Chai Wah Wu, <a href="/A343724/b343724.txt">Table of n, a(n) for n = 1..61</a> (terms for n = 1..40 from Robert G. Wilson v)

%t a[n_] := Block[{k = Floor[ Sqrt[10^n/5]]}, If[OddQ@k, k--]; While[ Union[ EvenQ[ IntegerDigits[ k^2]]] != {True}, k += 2]; k^2]; Array[ a, 20] (* _Robert G. Wilson v_, May 20 2021 *)

%o (Python 3.8+)

%o from math import isqrt

%o def A343724(n):

%o if n == 1: return 0

%o m = isqrt(2*10**(i-1))+1

%o m += m % 2

%o k = m**2

%o s = set('02468')

%o while not set(str(k)) <= s:

%o m += 2

%o k += 4*(m-1)

%o return k # _Chai Wah Wu_, May 20 2021

%Y Cf. A030098, A343725.

%K nonn,base

%O 1,2

%A _Jon E. Schoenfield_, May 19 2021

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 01:06 EDT 2024. Contains 371964 sequences. (Running on oeis4.)