This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A359800 #64 Feb 16 2023 15:15:29 %S A359800 6,9,61,9,6,1,284,516,225,489,104,4,744,249,625,3201,444,9,201,689, %T A359800 4201,416,984,4801,681,5201,316,996,5801,601,6201,144,936,6801,449, %U A359800 7201,7401,804,7801,225,8201,8401,6,8801,9001,9201,9401,324,9801,19344,769,38025 %N A359800 a(n) is the least m such that the concatenation of n^2 and m is a square. %C A359800 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. %C A359800 From _Thomas Scheuerle_, Jan 14 2023: (Start) %C A359800 The only term with two digits is a(3) = 61. %C A359800 Some terms with an odd number of digits appear infinitely often, for example, 516 for n = 8, 1352, 632958674, ... . %C A359800 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) %H A359800 Chai Wah Wu, <a href="/A359800/b359800.txt">Table of n, a(n) for n = 1..10000</a> %H A359800 <a href="/index/Sq#sqtrunc">Index to sequences related to truncating digits of squares</a>. %F A359800 a(n) = A071176(n^2) = A071176(A000290(n)). %F A359800 From _Thomas Scheuerle_, Jan 13 2023: (Start) %F A359800 a(A084070(n)) = 1. %F A359800 a(2*A084070(n)) = 4. %F A359800 a(A221874(n)) = 6. %F A359800 a(A075836(n)) = 9. (End) %e A359800 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. %e A359800 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. %o A359800 (Python) %o A359800 from math import isqrt %o A359800 def a(n): %o A359800 t, k = str(n*n), isqrt(10*n**2) %o A359800 while not (s:=str(k*k)).startswith(t) or s[len(t)]=="0": k += 1 %o A359800 return int(s[len(t):]) %o A359800 print([a(n) for n in range(1, 53)]) # _Michael S. Branicky_, Jan 15 2023 %o A359800 (Python) %o A359800 from math import isqrt %o A359800 from sympy.ntheory.primetest import is_square %o A359800 def A359800(n): %o A359800 m = 10*n*n %o A359800 if is_square(m): return 0 %o A359800 a = 1 %o A359800 while (k:=(isqrt(a*(m+1)-1)+1)**2-m*a)>=10*a: %o A359800 a *= 10 %o A359800 return k # _Chai Wah Wu_, Feb 15 2023 %o A359800 (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 %Y A359800 Cf. A000290, A071176, A075836, A084070, A221874, A246560. %K A359800 nonn,look,base %O A359800 1,1 %A A359800 _Mohammed Yaseen_, Jan 13 2023