login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A090293
Least k > n such that the decimal expansion of k^2 ends in n^2.
3
10, 9, 8, 7, 46, 15, 44, 43, 42, 41, 90, 239, 488, 237, 486, 35, 484, 233, 482, 231, 80, 229, 478, 227, 476, 75, 474, 223, 472, 221, 70, 219, 2468, 1217, 2466, 285, 2464, 1213, 2462, 1289, 460, 1209, 2458, 1293, 2456, 205, 2454, 1297, 2452, 1201, 150, 1301
OFFSET
0,1
LINKS
Michael S. Branicky, Table of n, a(n) for n = 0..10000 (terms 0..1000 from T. D. Noe)
FORMULA
a(n) = A090292(n)^(1/2).
MATHEMATICA
Table[k = n; d = IntegerDigits[n^2]; len = Length[d]; While[k++; Take[IntegerDigits[k^2], -len] != d]; k, {n, 0, 51}] (* T. D. Noe, Mar 23 2012 *)
PROG
(Python)
def a(n):
k, target = n + 1, str(n*n)
while not str(k*k).endswith(target): k += 1
return k
print([a(n) for n in range(52)]) # 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 isqrt(int(str(k)+target))
print([a(n) for n in range(52)]) # Michael S. Branicky, Oct 09 2021
CROSSREFS
Cf. A090292.
Sequence in context: A055121 A249591 A132674 * A164732 A070562 A216557
KEYWORD
base,nonn
AUTHOR
Amarnath Murthy, Nov 29 2003
EXTENSIONS
More terms from Vladeta Jovovic, Jun 18 2004
STATUS
approved