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!)
A369689 a(n) is the least positive number k such that k^2 is the concatenation of m and m + n for some positive number m, or -1 if there is no such k. 1
36363636364, 428, 8874, 5, 310, 4, 39, -1, 7747, 465 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,1
COMMENTS
a(n) is the least number k > 0, if it exists, such that k^2 = (10^d + 1) m + n for some m > 0 where 10^(d-1) <= m + n < 10^d.
The attached file a369689.txt has lines n k m where k = a(n) and k^2 is the concatenation of m and m + n, n -1 where a(n) can be proved to be -1, and n -1 ? where I have not found a k that works but I have not been able to prove that a(n) = -1.
LINKS
Robert Israel, Proving a(n) = -1
Robert Israel, Table of n, a(n), m for n = 0 .. 300 with some conjectured entries.
EXAMPLE
a(3) = 5 because 5^2 = 25 is the concatenation of 2 and 2 + 3 = 5, and 5 is the least m that works.
a(7) = -1 because it can be proven that 7 is not a square mod (10^d + 1) for any d, and therefore there are no k and m such that k^2 is the concatenation of m and m + 7.
PROG
(Python)
from itertools import count
from sympy import sqrt_mod
def A369689(n):
for j in count(0):
b = 10**j
a = b*10+1
for k in sorted(sqrt_mod(n, a, all_roots=True)):
m = (k**2-n)//a
if m>0 and b <= m+n < a-1:
return k # Chai Wah Wu, Feb 18 2024
CROSSREFS
Cf. A106497.
Sequence in context: A233849 A370486 A116279 * A106497 A204097 A295355
KEYWORD
sign,more
AUTHOR
Robert Israel, Jan 28 2024
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 August 22 04:09 EDT 2024. Contains 375355 sequences. (Running on oeis4.)