login
A068493
Primes which are concatenations of positive squares.
2
11, 19, 41, 149, 181, 191, 199, 251, 419, 449, 491, 499, 641, 811, 911, 919, 941, 991, 1009, 1181, 1259, 1289, 1361, 1481, 1499, 1619, 1699, 1811, 1949, 1999, 2251, 2549, 2591, 3691, 4001, 4111, 4259, 4289, 4441, 4481, 4649, 4729, 4919, 4999, 6449, 6481, 6491
OFFSET
1,1
LINKS
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
Cf. A000290, subsequence of A066591.
Sequence in context: A066591 A061246 A353102 * A167535 A184328 A260271
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