OFFSET
1,1
COMMENTS
The sequence includes y^2 when (x,y) is a positive integer solution of the Pell equation 10*x^2 + 1 = y^2 (see A023111).
If k is a term, then so is 10^6 * k.
LINKS
Chai Wah Wu, Table of n, a(n) for n = 1..73
EXAMPLE
a(3) = 49729 is a term because 49729 = 223^2 is a square and is the concatenation of 49 = 7^2 and 729 = 9^3.
MAPLE
filter:= proc(n) local i, y;
for i from 1 to ilog10(n) do
y:= n mod 10^i;
if y >= 10^(i-1) and issqr((n-y)/10^i) and iscube(y) then return true fi
od;
false
end proc;
select(filter, [seq(i^2, i=1..10^6)]);
PROG
(Python)
from itertools import count, islice
from sympy import integer_nthroot
def A389643_gen(): # generator of terms
for x in count(1):
x2 = x**2
s = str(x2)
for i in range(1, len(s)):
y, z = int(s[:i]), int(s[i:])
if s[i]>'0' and integer_nthroot(y, 2)[1] and integer_nthroot(z, 3)[1]:
yield x2
break
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Robert Israel, Oct 09 2025
STATUS
approved
