OFFSET
1,1
EXAMPLE
a(3) is 209 since it is the least number greater than a(2)=41 which concatenated with 41 forms a perfect square, i.e., 41209 = 203^2.
MATHEMATICA
f[n_] := Block[{x = n, d = 1 + Floor@ Log10@ n}, q = (Floor@ Sqrt[(10^d + 1) x] + 1)^2; If[q < (10^d) (x + 1), Mod[q, 10^d], Mod[(Floor@ Sqrt[(10^d)(10x + 1) - 1] + 1)^2, 10^(d + 1)] ]]; NestList[f, 8, 25] (* after the algorithm of David W. Wilson in A090566 *)
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Robert G. Wilson v, Dec 02 2015
STATUS
approved