login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A359800 a(n) is the least m such that the concatenation of n^2 and m is a square. 1
6, 9, 61, 9, 6, 1, 284, 516, 225, 489, 104, 4, 744, 249, 625, 3201, 444, 9, 201, 689, 4201, 416, 984, 4801, 681, 5201, 316, 996, 5801, 601, 6201, 144, 936, 6801, 449, 7201, 7401, 804, 7801, 225, 8201, 8401, 6, 8801, 9001, 9201, 9401, 324, 9801, 19344, 769, 38025 (list; graph; refs; listen; history; text; internal format)
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
a(n) = A071176(n^2) = A071176(A000290(n)).
From Thomas Scheuerle, Jan 13 2023: (Start)
a(A084070(n)) = 1.
a(2*A084070(n)) = 4.
a(A221874(n)) = 6.
a(A075836(n)) = 9. (End)
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
Sequence in context: A056425 A056416 A061401 * A264380 A284636 A046498
KEYWORD
nonn,look,base
AUTHOR
Mohammed Yaseen, Jan 13 2023
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 11:29 EDT 2024. Contains 371967 sequences. (Running on oeis4.)