OFFSET
1,1
LINKS
Chai Wah Wu, Table of n, a(n) for n = 1..10000
PROG
(Python)
from gmpy2 import isqrt
def A030688(n):
d, nd = 10, 10*n**2
while True:
x = isqrt(nd-1)+1
if not x % 10:
x += 1
x = x**2
if x < nd+d:
return int(x)
d *= 10
nd *= 10 # Chai Wah Wu, May 24 2016
CROSSREFS
KEYWORD
nonn,base
AUTHOR
STATUS
approved