OFFSET
1,1
EXAMPLE
a(5) = 23 as 23^2 = 529 = 5'29 and 5'i is nonsquare for i<29, A071176(5)=29.
PROG
(Python)
from math import isqrt
def A071177(n):
m = 10*n
if (k:=isqrt(m))**2!=m:
a = 1
while (k:=isqrt(a*(m+1)-1)+1)**2-m*a>=10*a:
a *= 10
return k # Chai Wah Wu, Feb 15 2023
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Reinhard Zumkeller, May 15 2002
STATUS
approved