OFFSET
1,2
COMMENTS
From Robert G. Wilson v, May 20 2021: (Start)
The square root of any term is == {0, 2, 8} (mod 10).
Other than 1 and 9, there are no squares which contain only odd digits.
(End)
LINKS
Chai Wah Wu, Table of n, a(n) for n = 1..61 (terms for n = 1..40 from Robert G. Wilson v)
MATHEMATICA
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 *)
PROG
(Python 3.8+)
from math import isqrt
def A343724(n):
if n == 1: return 0
m = isqrt(2*10**(i-1))+1
m += m % 2
k = m**2
s = set('02468')
while not set(str(k)) <= s:
m += 2
k += 4*(m-1)
return k # Chai Wah Wu, May 20 2021
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Jon E. Schoenfield, May 19 2021
STATUS
approved