OFFSET
1,1
LINKS
Michael S. Branicky, Table of n, a(n) for n = 1..10000
EXAMPLE
149 is a term of the sequence since it is the concatenation of squares 1, 4, 9.
251 is a term of the sequence since it is the concatenation of squares 25, 1. - Sean A. Irvine, Feb 19 2024
PROG
(Python)
from sympy import primerange
from itertools import count, islice
def iscat(w, A):
return False if len(w) < 2 else any(w[:i] in A and (w[i:] in A or iscat(w[i:], A)) for i in range(1, len(w)))
def agen():
S = set()
for d in count(2):
S |= {str(i*i) for i in range(10**(d-2), 10**(d-1))}
for p in primerange(10**(d-1), 10**d):
if iscat(str(p), S):
yield p
print(list(islice(agen(), 50))) # Michael S. Branicky, Feb 20 2024
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Joseph L. Pe, Mar 11 2002
EXTENSIONS
Corrected and extended by Sascha Kurz, Mar 26 2002
Data corrected by Sean A. Irvine, Feb 19 2024
STATUS
approved