OFFSET
0,1
COMMENTS
Subsidiary Sequence: n-th square whose decimal expansion ends in n^2.
LINKS
Michael S. Branicky, Table of n, a(n) for n = 0..10000
FORMULA
a(n) = A090293(n)^2. - David Wasserman, Oct 27 2005
PROG
(Python)
def a(n):
k, target = n + 1, str(n*n)
while not str(k*k).endswith(target): k += 1
return k*k
print([a(n) for n in range(38)]) # Michael S. Branicky, Oct 09 2021
(Python) # alternate version
from math import isqrt
def issquare(n): return isqrt(n)**2 == n
def a(n):
k, target = 1, str(n*n)
while not issquare(int(str(k)+target)): k += 1
return int(str(k)+target)
print([a(n) for n in range(38)]) # Michael S. Branicky, Oct 09 2021
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Amarnath Murthy, Nov 29 2003
EXTENSIONS
More terms from David Wasserman, Oct 27 2005
STATUS
approved