A068493 Primes which are concatenations of positive squares.
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
Examples
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
Links
- Michael S. Branicky, Table of n, a(n) for n = 1..10000
Programs
-
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
Extensions
Corrected and extended by Sascha Kurz, Mar 26 2002
Data corrected by Sean A. Irvine, Feb 19 2024