OFFSET
1,1
COMMENTS
The only one-digit terms are 1, 4, 6 and 9. Proof: Squares mod 10 are 0, 1, 4, 5, 6 and 9. Concatenation of a square and 0 is 10 times that square, which is not a square. So 0 is ruled out. Squares with last digit 5 have second last digit 2. Since no square ends in 2, 5 is also ruled out.
From Thomas Scheuerle, Jan 14 2023: (Start)
The only term with two digits is a(3) = 61.
Some terms with an odd number of digits appear infinitely often, for example, 516 for n = 8, 1352, 632958674, ... .
If a term has an even number of digits and is of the form 1+2*k*10^(d+1) with 10^d <= 2*k < 10^(d+1), then it appears only once at k = n in this sequence. Are terms with an even number of digits possible which are not of this form? (End)
LINKS
FORMULA
EXAMPLE
For n=3, 61 is the least number m such that the concatenation of 3^2 and m is a square: 961 = 31^2. So a(3) = 61.
For n=7, 284 is the least number m such that the concatenation of 7^2 and m is a square: 49284 = 222^2. So a(7) = 284.
PROG
(Python)
from math import isqrt
def a(n):
t, k = str(n*n), isqrt(10*n**2)
while not (s:=str(k*k)).startswith(t) or s[len(t)]=="0": k += 1
return int(s[len(t):])
print([a(n) for n in range(1, 53)]) # Michael S. Branicky, Jan 15 2023
(Python)
from math import isqrt
from sympy.ntheory.primetest import is_square
def A359800(n):
m = 10*n*n
if is_square(m): return 0
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
(PARI) a(n)={my(m=n^2, b=1); while(1, m*=10; my(r=(sqrtint(m+b-1)+1)^2-m); b*=10; if(r<b, return(r)))} \\ Andrew Howroyd, Jan 13 2023
CROSSREFS
KEYWORD
AUTHOR
Mohammed Yaseen, Jan 13 2023
STATUS
approved